From 53c274ca3722c2dfc2eb14349d5339632ade4d5a Mon Sep 17 00:00:00 2001
From: Klas Arvidsson <klas.arvidsson@liu.se>
Date: Mon, 13 Jan 2020 18:58:33 +0100
Subject: [PATCH] help scripts to avoid mistakes

---
 git-merge-push-production.sh | 11 +++++++++++
 puppet.sh                    |  3 +++
 2 files changed, 14 insertions(+)
 create mode 100755 git-merge-push-production.sh
 create mode 100755 puppet.sh

diff --git a/git-merge-push-production.sh b/git-merge-push-production.sh
new file mode 100755
index 0000000..8846ad7
--- /dev/null
+++ b/git-merge-push-production.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+git_cmds=("checkout production" "merge devel" "push" "checkout devel")
+
+for cmd in "${git_cmds[@]}"
+do
+    if ! git $cmd
+    then
+	exit $?
+    fi
+done
diff --git a/puppet.sh b/puppet.sh
new file mode 100755
index 0000000..592eaaf
--- /dev/null
+++ b/puppet.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec sudo /opt/puppetlabs/bin/puppet $*
-- 
GitLab