From 81ccc8bba44dfda9bc9c41a8818ce628c21d9c57 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 21 Mar 2017 22:56:38 +0100 Subject: [PATCH] replace only if build not exists --- build-scripts/resinos-build/create_resinos.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-scripts/resinos-build/create_resinos.sh b/build-scripts/resinos-build/create_resinos.sh index 8e38363b9..8c3603784 100755 --- a/build-scripts/resinos-build/create_resinos.sh +++ b/build-scripts/resinos-build/create_resinos.sh @@ -67,7 +67,9 @@ fi echo "[INFO] Inject HassIO yocto layer" cp -fr $HASSIO_ROOT/meta-hassio $WORKSPACE/layers/ -sed -i 's%${TOPDIR}/../layers/meta-resin/meta-resin-common \\%${TOPDIR}/../layers/meta-resin/meta-resin-common \\\n${TOPDIR}/../layers/meta-hassio \\%g' $WORKSPACE/layers/*/conf/samples/bblayers.conf.sample +if [ ! -d $WORKSPACE/build/conf ]; then + sed -i 's%${TOPDIR}/../layers/meta-resin/meta-resin-common \\%${TOPDIR}/../layers/meta-resin/meta-resin-common \\\n${TOPDIR}/../layers/meta-hassio \\%g' $WORKSPACE/layers/*/conf/samples/bblayers.conf.sample +fi # Additional variables BARYS_ARGUMENTS_VAR="-a HASSIO_SUPERVISOR_TAG=$SUPERVISOR_TAG -a HOMEASSISTANT_REPOSITORY=$HOMEASSISTANT_REPOSITORY -a HASSIO_VERSION=$HASSIO_VERSION"