diff --git a/resources/build.sh b/resources/build.sh index 95f986e..cda2209 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -2,7 +2,7 @@ cross_compile=false build_hisi=false -debug_deploy=false +debug_deploy=true TARGET_IP="172.16.104.49" TARGET_PATH="/system/bin" base_path=$(pwd) @@ -132,8 +132,20 @@ function initialize() { ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "test -e /sdcard/gdbserver || exit 1" && scp -i ~/.ssh/ssh_host_rsa_key_ok /opt/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/bin/gdbserver root@${TARGET_IP}:/sdcard ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "test -e /sdcard/gdb || exit 1" && scp -i ~/.ssh/ssh_host_rsa_key_ok /mnt/e/Documents/瑞为/FacePass/gdb-rk root@${TARGET_IP}:/sdcard/gdb + ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} " + if ! grep -q '/data/sdcard/GateFace' /system/bin/start-app.sh; then + sed -i.bak '/background_run \/system\/bin\/GateFace \$d_state/c\\ + if [ -f /data/sdcard/GateFace ]; then \\ + background_run /data/sdcard/GateFace \$d_state \\ + else \\ + background_run /system/bin/GateFace \$d_state \\ + fi' /system/bin/start-app.sh + fi + " + ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "sync" + sed -i 's/@sh/@bash/g' Makefile file="src/gate_face/Makefile.mak" if ! grep -q "/opt/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf" $file; then awk -v n=157 -v text=' @@ -172,9 +184,9 @@ function build_old() { fi qtmoc - # if [ $? -ne 0 ]; then - # exit 1 - # fi + if [ $? -ne 0 ]; then + exit 1 + fi if [ $build_hisi = true ]; then docker run -it --rm --user 1000:1000 -v /opt:/opt -v $(pwd):$(pwd) -w $(pwd) frp-by1.wwvvww.cn:45288/nanopb:0.3.9.3 make server_protocol @@ -218,11 +230,6 @@ function deploy_old() { else # scp -i ~/Projects/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/librwhscheckpw/lib/librwhscheckpw.so root@${TARGET_IP}:/system/lib/ scp -i ~/.ssh/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/rwStageProtocol/lib/librwSrvProtocol.so root@${TARGET_IP}:/system/lib/ - # scp -i ~/Projects/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/ffmepg/lib/libavdevice.so.58 root@${TARGET_IP}:/system/lib/ - # scp -i ~/Projects/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/ffmepg/lib/libavfilter.so.7 root@${TARGET_IP}:/system/lib/ - # scp -i ~/Projects/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/ffmepg/lib/libavformat.so.58 root@${TARGET_IP}:/system/lib/ - # scp -i ~/Projects/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/ffmepg/lib/libavutil.so.56 root@${TARGET_IP}:/system/lib/ - # scp -i ~/Projects/ssh_host_rsa_key_ok ./3rdparty/arm-linux-gnueabihf/ffmepg/lib/libswresample.so.3 root@${TARGET_IP}:/system/lib/ fi ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "sync"