aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..4d7c6e4
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+if [ $# -eq 0 ]; then
+ echo 'Should provide least one argument'
+ exit 1
+fi
+ARCH=$(/usr/bin/uname -m)
+/usr/bin/rsync --partial -r --update --link --delete $DEPLOY_ARGS --exclude=.gitignore "packages/$ARCH" $1:/var/www/repo/
+echo "date +%s > /var/www/repo/$ARCH/LAST_SYNC" | /usr/bin/xargs /usr/bin/ssh $1