Use tar to deploy

This commit is contained in:
Aleksander Gustaw Wasaznik 2016-09-13 21:13:46 +02:00
parent 7b85d39629
commit 0ac75ff93a
1 changed files with 2 additions and 2 deletions

4
deploy.sh Normal file → Executable file
View File

@ -3,5 +3,5 @@
# It will upload all files not ignored by git
files_not_ignored="$(git status --short | grep ^? | cut -d\ -f2- ; git ls-files)"
scp -r $files_not_ignored root@brzeczyszczykiewicz.pvv.ntnu.no:~grzegorz/grzegorz
ssh root@brzeczyszczykiewicz.pvv.ntnu.no systemctl restart grzegorz
tar -c $files_not_ignored | ssh grzegorz@brzeczyszczykiewicz.pvv.ntnu.no tar -xC ~grzegorz/grzegorz
ssh root@brzeczyszczykiewicz.pvv.ntnu.no "systemctl restart grzegorz"