summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2014-10-09 20:09:31 (GMT)
committerPaul Sherwood <paul.sherwood@codethink.co.uk>2014-10-09 20:09:31 (GMT)
commit76a9ee333741f3834bd8fe03e490aeba724fef96 (patch)
tree80f3f75376501350cdbd9334179d44ef078995d3 /scripts
parent2c309cffa618808f5f0d871616cfb76d729713c0 (diff)
downloaddefinitions-76a9ee333741f3834bd8fe03e490aeba724fef96.tar.gz
Tidy up a bit, and don't let user run this in TEST system
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cycle.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/cycle.sh b/scripts/cycle.sh
index 8fab43b..3d1b45f 100755
--- a/scripts/cycle.sh
+++ b/scripts/cycle.sh
@@ -29,15 +29,22 @@ if [ -z "$1" ] || [ -z "$2" ] ; then
exit 1
fi
+if [ `system-version-manager get-running | grep ^TEST$` ]; then
+ echo "You are currently running the TEST system."
+ echo "Maybe you want to boot into a different system version?"
+ exit 1
+fi
+
set -e
set -v
+system-version-manager set-default factory
+if [ `system-version-manager list | grep ^TEST$` ]; then
+ system-version-manager remove TEST
+fi
+
morph gc
morph build $1
-system-version-manager set-default factory
-if [ `system-version-manager list | grep ^TEST$` ]; then
- system-version-manager remove TEST
-fi
sed -i "s|^- morph: .*$|- morph: $1|" $2
morph deploy --upgrade $2 self.HOSTNAME=$(hostname) self.VERSION_LABEL=TEST