aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2021-11-03 19:48:05 +0800
committerKunoiSayami <[email protected]>2021-11-03 19:48:05 +0800
commit7833bbf7de0958551831b584464f67e4af3f6a1b (patch)
treeb12cc7c70dea8f9fde586e6c1aac491e5192ca84 /deploy.sh
parent625e47a247523314c8f63de4135df17c86f4e513 (diff)
feat(script): Optimize GPG key import
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/deploy.sh b/deploy.sh
index 045e03f..d380b76 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -7,5 +7,12 @@ if [ $# -eq 0 ]; then
echo 'Should provide least one argument'
exit 1
fi
+
+if [ -z ${SSH_CLIENT+x} ]; then
+ ADDITIONAL_PARAM="-Pv"
+else
+ ADDITIONAL_PARAM=""
+fi
+
/usr/bin/date +%s > "packages/LASTSYNC"
-/usr/bin/rsync --partial -r -c --update --links --delete --exclude=.gitignore "packages/" $1:/var/www/repo/
+/usr/bin/rsync --partial $ADDITIONAL_PARAM -r -c --update --links --delete --exclude=.gitignore "packages/" $1:/var/www/repo/