23 lines
571 B
Bash
Executable File
23 lines
571 B
Bash
Executable File
#!/bin/sh
|
|
echo "======================= BUILD_CI $1 ======================="
|
|
|
|
[ -d images ] && rm -f ./images/*.trx
|
|
./build_firmware_modify $1 > build.log 2>&1 &
|
|
|
|
while true ;do
|
|
sleep 10
|
|
echo "===================================================================================================="
|
|
process_status="$(pgrep -f build_firmware_modify)"
|
|
|
|
if [ -z "$process_status" ] ;then
|
|
echo "Build script is exited"
|
|
if [ -f ./images/*.trx ]; then
|
|
tail -20 build.log && exit 0
|
|
else
|
|
tail -60 build.log && exit 1
|
|
fi
|
|
else
|
|
echo "$(tail -2 build.log)"
|
|
fi
|
|
done
|