xref: /OK3568_Linux_fs/debian/mk-base-debian.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/bash -e
2
3if [ "$RELEASE" == "stretch" ]; then
4	RELEASE='stretch'
5elif [ "$RELEASE" == "buster" ]; then
6	RELEASE='buster'
7elif [ "$RELEASE" == "bullseye" ]; then
8	RELEASE='bullseye'
9else
10    echo -e "\033[36m please input the os type,stretch, buster or bullseye...... \033[0m"
11fi
12
13if [ "$ARCH" == "armhf" ]; then
14	ARCH='armhf'
15elif [ "$ARCH" == "arm64" ]; then
16	ARCH='arm64'
17else
18    echo -e "\033[36m please input the os type,armhf or arm64...... \033[0m"
19fi
20
21if [ ! $TARGET ]; then
22	TARGET='desktop'
23fi
24
25if [ -e linaro-$RELEASE-alip-*.tar.gz ]; then
26	rm linaro-$RELEASE-alip-*.tar.gz
27fi
28
29cd ubuntu-build-service/$RELEASE-$TARGET-$ARCH
30
31echo -e "\033[36m Staring Download...... \033[0m"
32
33make clean
34
35./configure
36
37make
38
39if [ -e linaro-$RELEASE-alip-*.tar.gz ]; then
40	sudo chmod 0666 linaro-$RELEASE-alip-*.tar.gz
41	mv linaro-$RELEASE-alip-*.tar.gz ../../
42else
43	echo -e "\e[31m Failed to run livebuild, please check your network connection. \e[0m"
44fi
45