-
Notifications
You must be signed in to change notification settings - Fork 4
/
mk-base-debian.sh
executable file
·74 lines (62 loc) · 1.76 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash -e
if [ ! $TARGET ]; then
echo "---------------------------------------------------------"
echo "please enter TARGET version number:"
echo "请输入要构建的根文件系统版本:"
echo "[0] Exit Menu"
echo "[1] lite"
echo "[2] xfce"
echo "[3] xfce-full"
echo "---------------------------------------------------------"
read input
case $input in
0)
exit;;
1)
TARGET=lite
;;
2)
TARGET=xfce
;;
3)
TARGET=xfce-full
ARCH=arm64
;;
*)
echo -e "\033[47;36m input TARGET version number error, exit ! \033[0m"
exit;;
esac
echo -e "\033[47;36m set TARGET=$TARGET...... \033[0m"
fi
if [[ "$RELEASE" == "stretch" || "$RELEASE" == "9" ]]; then
RELEASE='stretch'
elif [[ "$RELEASE" == "buster" || "$RELEASE" == "10" ]]; then
RELEASE='buster'
else
RELEASE='buster'
echo -e "\033[47;36m set default RELEASE='buster'...... \033[0m"
fi
if [ "$ARCH" == "armhf" ]; then
ARCH='armhf'
elif [ "$ARCH" == "arm64" ]; then
ARCH='arm64'
else
ARCH="arm64"
echo -e "\033[47;36m set default ARCH=arm64...... \033[0m"
fi
if [ -e linaro-$RELEASE-$TARGET-alip-*.tar.gz ]; then
rm linaro-$RELEASE-$TARGET-alip-*.tar.gz
fi
sudo rm -rf binary/
cd ubuntu-build-service/$RELEASE-$TARGET-$ARCH
echo -e "\033[36m Staring Download...... \033[0m"
make clean
./configure
make
DATE=$(date +%Y%m%d)
if [ -e linaro-$RELEASE-alip-*.tar.gz ]; then
sudo chmod 0666 linaro-$RELEASE-alip-*.tar.gz
mv linaro-$RELEASE-alip-*.tar.gz ../../linaro-$RELEASE-$TARGET-alip-$DATE.tar.gz
else
echo -e "\e[31m Failed to run livebuild, please check your network connection. \e[0m"
fi