forked from ayufan-pine64/linux-pine64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
48 lines (39 loc) · 723 Bytes
/
build.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
#!/bin/bash
set -e
PLATFORM=""
MODULE=""
show_help()
{
printf "\nbuild.sh - Top level build scritps\n"
echo "Valid Options:"
echo " -h Show help message"
echo " -p <platform> platform, e.g. sun6i, sun6i_fiber or sun6i_dragonboard"
printf " -m <module> module\n\n"
}
while getopts hp:m: OPTION
do
case $OPTION in
h) show_help
;;
p) PLATFORM=$OPTARG
;;
m) MODULE=$OPTARG
;;
*) show_help
;;
esac
done
if [ -z "$PLATFORM" ]; then
show_help
exit 1
fi
if [ -z "$MODULE" ]; then
MODULE="all"
fi
if [ -x ./scripts/build_${PLATFORM}.sh ]; then
./scripts/build_${PLATFORM}.sh $MODULE
else
printf "\nERROR: Invalid Platform\nonly sun6i sun6i_fiber or sun6i_dragonboard sopport\n"
show_help
exit 1
fi