summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-01-21 19:47:10 +0100
committerGeorg Pfuetzenreuter2023-01-21 19:47:10 +0100
commit7f9bf110488dde7113d685b2d0361fa55b003560 (patch)
tree579344a763b608a987d5c0a7d3bcc97bad3f8c7d
parent50c638a00024141cea7dfc445fa17bf336d5db83 (diff)
downloadsalt-7f9bf110488dde7113d685b2d0361fa55b003560.tar.gz
salt-7f9bf110488dde7113d685b2d0361fa55b003560.tar.bz2
salt-7f9bf110488dde7113d685b2d0361fa55b003560.zip
Add clone_formulas script
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
-rwxr-xr-xbin/clone_formulas.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/clone_formulas.sh b/bin/clone_formulas.sh
new file mode 100755
index 0000000..e6f9e56
--- /dev/null
+++ b/bin/clone_formulas.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -Ceu
+
+FORMULASDIR='/srv/formulas'
+
+if [ ! -d "$FORMULASDIR" ]
+then
+ git clone --recurse-submodules --single-branch -b production https://git.com.de/LibertaCasa/salt-formulas.git "$FORMULASDIR"
+ exit "$?"
+fi
+
+git -C "$FORMULASDIR" pull --recurse-submodules