aboutsummaryrefslogtreecommitdiff
path: root/utils/deploy.sh
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2021-11-07 13:48:41 +0800
committerKunoiSayami <[email protected]>2021-11-07 13:48:41 +0800
commit254846d3da3f6c7fb70b316f5ebdf2ce4215309f (patch)
tree67b310059f2825fc0555e05704706b5dc7e5d710 /utils/deploy.sh
parentd1e83791bd44afe1c74ba6bd0c4ede86852005bc (diff)
refactor(script): Move all script to utils folder
* feat(script): Build test package not request signing for now Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'utils/deploy.sh')
-rwxr-xr-xutils/deploy.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/deploy.sh b/utils/deploy.sh
new file mode 100755
index 0000000..462cfdf
--- /dev/null
+++ b/utils/deploy.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# end up when failed
+set -Eeuo pipefail
+
+if [ $# -eq 0 ]; then
+ echo 'Should provide least one argument'
+ exit 1
+fi
+
+if [ -z ${SSH_CLIENT+x} ]; then
+ ADDITIONAL_PARAM="--partial"
+else
+ ADDITIONAL_PARAM="-Pv"
+fi
+
+/usr/bin/date +%s > "packages/LASTSYNC"
+/usr/bin/rsync $ADDITIONAL_PARAM -r -c --update --links --delete --exclude=.gitignore "packages/" $1:/var/www/repo/