forked from TinkerBoard2/debian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mk-base-debian.sh
executable file
·48 lines (36 loc) · 1.04 KB
/
mk-base-debian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash -e
if [ "$RELEASE" == "stretch" ]; then
RELEASE='stretch'
elif [ "$RELEASE" == "buster" ]; then
RELEASE='buster'
else
echo -e "\033[36m please input the os type,stretch or buster...... \033[0m"
fi
if [ "$ARCH" == "armhf" ]; then
ARCH='armhf'
elif [ "$ARCH" == "arm64" ]; then
ARCH='arm64'
else
echo -e "\033[36m please input the os type,armhf or arm64...... \033[0m"
fi
if [ ! $TARGET ]; then
TARGET='desktop'
fi
ROOTFS_BASE_DIR="../rootfs-base"
if [ ! -e $ROOTFS_BASE_DIR ]; then
ROOTFS_BASE_DIR="."
fi
if [ -e $ROOTFS_BASE_DIR/linaro-$RELEASE-alip-$ARCH-*.tar.gz ]; then
rm $ROOTFS_BASE_DIR/linaro-$RELEASE-alip-$ARCH-*.tar.gz
fi
cd ubuntu-build-service/$RELEASE-$TARGET-$ARCH
echo -e "\033[36m Staring Download...... \033[0m"
make clean
./configure
make
if [ -e linaro-$RELEASE-alip-$ARCH-*.tar.gz ]; then
sudo chmod 0666 linaro-$RELEASE-alip-$ARCH-*.tar.gz
mv linaro-$RELEASE-alip-$ARCH-*.tar.gz ../../$ROOTFS_BASE_DIR/
else
echo -e "\e[31m Failed to run livebuild, please check your network connection. \e[0m"
fi