mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35:33 -04:00
[SQUASH] build.sh: Fix issues implement functions
build.sh: Fix not sourcing build/envsetup.sh build.sh: use curly braces build.sh: implement time diff build.sh: Fix my stupid syntax error build.sh: Fix my stupid syntax error v2 build.sh: implement error log sender build.sh: NO SPAM SIR build.sh: stylish build.sh: missCCC
This commit is contained in:
parent
7330e6416a
commit
1bddc84981
2 changed files with 24 additions and 13 deletions
35
build.sh
Normal file → Executable file
35
build.sh
Normal file → Executable file
|
|
@ -32,22 +32,33 @@ if [ "$#" -lt 2 ]; then
|
||||||
tg_sendText "Illegal number of parameters ($#)"
|
tg_sendText "Illegal number of parameters ($#)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
. build/envsetup.sh
|
||||||
TARGET=${*%${!#}}
|
TARGET=${*%${!#}}
|
||||||
tg_sendText "VENDOR = $VENDOR, Devices = ${@:$#}, Build Target=$TARGET"
|
if [ "$1" == "all" ]; then
|
||||||
for i in TARGET; do
|
TARGET="a10 a20 a20e a30 a40"
|
||||||
tg_sendText "$VENDOR $i lunch...";
|
fi
|
||||||
if lunch $VENDOR_$i-user; then
|
tg_sendText "[Vendor = $VENDOR], [Devices = $TARGET], [Build Target=${@:$#}]"
|
||||||
tg_sendText "$VENDOR $i lunch success";
|
for i in $TARGET; do
|
||||||
|
start=`date +%s`
|
||||||
|
tg_sendText "[$VENDOR][$i] lunch...";
|
||||||
|
if lunch ${VENDOR}_${i}-user; then
|
||||||
|
tg_sendText "[$VENDOR][$i] lunch success";
|
||||||
else
|
else
|
||||||
tg_sendText "$VENDOR $i lunch fail";
|
tg_sendText "[$VENDOR][$i] lunch failed";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
tg_sendText "$VENDOR $i build...";
|
tg_sendText "[$VENDOR][$i] start build...";
|
||||||
if m $TARGET; then
|
if ! m ${@:$#}; then
|
||||||
tg_sendText "$VENDOR $i finish";
|
end=`date +%s`
|
||||||
else
|
secs=$((end-start))
|
||||||
tg_sendText "$VENDOR $i failed";
|
tg_sendText "[$VENDOR][$i] fail in $((secs/3600)) Hours $((secs%3600/60)) Minutes $((secs%60)) Seconds";
|
||||||
|
if [ -e out/error.log ]; then
|
||||||
|
tg_sendFile "out/error.log"
|
||||||
|
fi
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
end=`date +%s`
|
||||||
|
secs=$((end-start))
|
||||||
|
tg_sendText "[$VENDOR][$i] success in $((secs/3600)) Hours $((secs%3600/60)) Minutes $((secs%60)) Seconds"
|
||||||
done
|
done
|
||||||
|
tg_sendText "All done"
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,4 @@ echo "Generating A30 Makefiles"
|
||||||
./device/samsung/a30/setup.sh
|
./device/samsung/a30/setup.sh
|
||||||
echo "Generating A40 Makefiles"
|
echo "Generating A40 Makefiles"
|
||||||
./device/samsung/a40/setup.sh
|
./device/samsung/a40/setup.sh
|
||||||
ln -s device/samsung/universal7885-common/build.sh
|
ln -sf device/samsung/build.sh
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue