-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate.sh
executable file
·32 lines (27 loc) · 1.23 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
date
cd ~/netbase
git commit -a --allow-empty-message -m \"''\" && git push --all && git status
# server="kfluegge@pannous.jo"
# server="root@quasiris.dev" # german!
server="root@quasiris.big" # all
echo using server $server
# find . -mmin -12 |grep -v nbproject| grep -v development |grep -v to_update|grep -v bin|grep -v build|grep -v compile.sh|grep -v update.sh|grep -v netbase.dSYM|grep -v iws |grep -v .txt|grep -v git| grep -v "./netbase$"> to_update
#
# exec < to_update
# while read line
# do
# if [[ -f $line ]]; then
# echo $line
# scp "$line" "$server:/root/netbase/$line"
# fi
# done
ssh -A "$server" "cd /root/netbase/;git pull"
# ssh -A "$server" "scp -r /root/netbase/src/* root@quasiris.big:/root/netbase/src/"
ssh "$server" "cd /root/netbase/; sed -i 's/300/30/' src/netbase.hpp "
ssh "$server" "cd /root/netbase/; sed -i 's/80/81/' src/webserver.cpp "
ssh "$server" "source .bash_profile; cd /root/netbase/;./compile.sh $@"
# ssh "$server" "cd /root/netbase/; nice nohup ./restart-server.sh > logfile.log 2>&1 &"
# ssh "$server" "cd /root/netbase/; screen -R netbase ./restart-server.sh"
ssh -t "$server" "cd /root/netbase/; screen -t netbase ./server.sh"
# rm to_update.tmp
date