From 5d388e6390a0f792d207be11e60d2cc48278cb71 Mon Sep 17 00:00:00 2001 From: Paul Sherwood Date: Sun, 5 Oct 2014 08:08:47 +0000 Subject: add cycle, and boost in the right place --- scripts/cycle.sh | 43 +++++++++++++++++++++++++++++++++ strata/genivi-demo-platform/boost.morph | 8 ++++++ 2 files changed, 51 insertions(+) create mode 100755 scripts/cycle.sh create mode 100644 strata/genivi-demo-platform/boost.morph diff --git a/scripts/cycle.sh b/scripts/cycle.sh new file mode 100755 index 00000000..8fab43b7 --- /dev/null +++ b/scripts/cycle.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# Copyright (C) 2014 Codethink Limited +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +usage() { + echo "Usage: cycle.sh some-system some-cluster" + echo + echo "This builds and deploys the current checked out version of" + echo "some-system, applying it as a self-upgrade to the system you" + echo "are working in, using configuration from some-cluster." + echo "The upgrade is labelled TEST, and is set to be the default for" + echo "next boot." +} + +if [ -z "$1" ] || [ -z "$2" ] ; then + usage + exit 1 +fi + +set -e +set -v + +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 diff --git a/strata/genivi-demo-platform/boost.morph b/strata/genivi-demo-platform/boost.morph new file mode 100644 index 00000000..7c3e6cff --- /dev/null +++ b/strata/genivi-demo-platform/boost.morph @@ -0,0 +1,8 @@ +name: boost +kind: chunk +configure-commands: +- ./bootstrap.sh +build-commands: +- ./b2 || true +install-commands: +- ./b2 install --prefix=$DESTDIR$PREFIX || true -- cgit v1.2.1