diff --git a/resources/build.sh b/resources/build.sh index c595dbf..a3411c9 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -1,6 +1,6 @@ #!/bin/bash cross_compile=true -TARGET_IP="192.168.8.115" +TARGET_IP="192.168.3.220" TARGET_PATH="/data/sdcard/PassengerStatistics" base_path=$(pwd) libraries_root="/opt/Libraries" @@ -116,26 +116,26 @@ function deploy_old() { # svn代码用 echo "deply to $TARGET_IP" # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/system/lib # while [ true ];do sleep 1;free; done - ssh -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} "mount -o remount rw /system/" - ssh -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} "killall start-app.sh; pgrep -f danki | xargs kill -s 9" + ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "mount -o remount rw /system/" + ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "killall start-app.sh; pgrep -f danki | xargs kill -s 9" - echo "put $PWD/source/2.Software/libs/danki /system/bin" | sftp -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} - echo "put $PWD/source/2.Software/libs/librwfds.so /system/lib/" | sftp -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} - echo "put $PWD/source/2.Software/libs/librwp2p.so /system/lib/" | sftp -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} - echo "put $PWD/source/2.Software/prebuilt-hi3516dv500/rw_mpp/lib/librw_mpp.so /system/lib/" | sftp -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} + echo "put $PWD/source/2.Software/libs/danki /system/bin" | sftp -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} + echo "put $PWD/source/2.Software/libs/librwfds.so /system/lib/" | sftp -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} + echo "put $PWD/source/2.Software/libs/librwp2p.so /system/lib/" | sftp -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} + echo "put $PWD/source/2.Software/prebuilt-hi3516dv500/rw_mpp/lib/librw_mpp.so /system/lib/" | sftp -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} - ssh -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} "sync" - ssh -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} "reboot" + ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "sync" + ssh -i ~/.ssh/ssh_host_rsa_key_ok root@${TARGET_IP} "reboot" } function clean_old() { # svn status | grep "?" | awk '{print $2}' - pushd source/2.Software/src - make clean - popd rm -fr source/2.Software/libs/* rm -fr source/2.Software/pkg - svn status | grep "?" | awk '{print $2}' | grep -E 'make'\|'Makefile'\|'/build' | xargs rm -fr + rm -fr source/2.Software/src/build + rm -fr source/2.Software/src/netconfig/build + find . -name "*.o" | xargs rm + git clean -f -n | grep -E "Makefile"\|"makeEnv" | xargs rm } function main() {