From 0311711a67259cf0fefddaf006e02dedb7785d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Wed, 1 May 2024 09:54:07 +0200 Subject: [PATCH] [add] tools:deploy --- tools/deploy | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tools/deploy diff --git a/tools/deploy b/tools/deploy new file mode 100755 index 0000000..f5b8164 --- /dev/null +++ b/tools/deploy @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +## functions + +function syntaxerror +{ + echo "SYNTAX: deploy " > /dev/stderr + exit 1 +} + + +## args + +if [ $# -ge 1 ] ; then target_sys=$1 && shift ; else syntaxerror ; fi +if [ $# -ge 1 ] ; then target_dir=$1 && shift ; else syntaxerror ; fi + + +## exec + +rsync \ + --rsh=ssh \ + --recursive \ + --update \ + --delete \ + --exclude="conf.json" \ + build/ \ + ${target_sys}:${target_dir}