1.添加Readme。
This commit is contained in:
@ -99,6 +99,45 @@ function clean() {
|
||||
fi
|
||||
}
|
||||
|
||||
function deploy_old() { # svn代码用
|
||||
if [ -n "$1" ]; then
|
||||
TARGET_IP=$1
|
||||
fi
|
||||
|
||||
pushd source/2.Software/src
|
||||
chmod +x ./genDankiMakefiles
|
||||
# ./genDankiMakefiles hi3516dv500
|
||||
make -j6
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
make install-hi3516dv500
|
||||
popd
|
||||
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"
|
||||
|
||||
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}
|
||||
|
||||
ssh -i ~/Projects/ssh_host_rsa_key_ok root@${TARGET_IP} "sync"
|
||||
ssh -i ~/Projects/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
|
||||
}
|
||||
|
||||
function main() {
|
||||
local cmd=$1
|
||||
shift 1
|
||||
@ -118,6 +157,12 @@ function main() {
|
||||
init)
|
||||
init $@
|
||||
;;
|
||||
old)
|
||||
deploy_old $@
|
||||
;;
|
||||
clean_old)
|
||||
clean_old $@
|
||||
;;
|
||||
*)
|
||||
build
|
||||
;;
|
||||
|
Reference in New Issue
Block a user