From e2394792b33f30e0facdae75fc6d6ad667fdf98b Mon Sep 17 00:00:00 2001 From: Tudor Marcu Date: Thu, 24 Mar 2016 01:11:11 -0700 Subject: [PATCH] Add option to provide which swupd binaries to use For testing or custom configurations it may be desirable to use swupd binaries that are not the system installed ones. Signed-off-by: Tudor Marcu --- create-update.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/create-update.sh b/create-update.sh index 59a03c5..fab4191 100755 --- a/create-update.sh +++ b/create-update.sh @@ -3,7 +3,7 @@ set -e CLRVER=$(cat "$PWD/.clear-version") MIXVER=$(cat "$PWD/.mix-version") - +PREFIX= while [[ $# > 0 ]] do @@ -17,6 +17,10 @@ do FORMAT="$2" shift ;; + -p|--prefix) + PREFIX="$2" + shift + ;; -h|--help) echo -e "Usage: mixer-create-update.sh\n" echo -e "\t-c, --config Supply specific builder.conf\n" @@ -50,14 +54,14 @@ if [ ! -d "$STATE_DIR/www/version/format$FORMAT" ]; then fi # step 1: create update content for current mix -sudo -E "swupd_create_update" -S "$STATE_DIR" --osversion $MIXVER +sudo -E "$PREFIX"swupd_create_update -S "$STATE_DIR" --osversion $MIXVER # step 2: create fullfiles -sudo -E "swupd_make_fullfiles" -S "$STATE_DIR" $MIXVER +sudo -E "$PREFIX"swupd_make_fullfiles -S "$STATE_DIR" $MIXVER # step 3: create zero/delta packs for bundle in $(ls "$BUNDLEREPO"); do - sudo -E "swupd_make_pack" -S "$STATE_DIR" 0 $MIXVER $bundle + sudo -E "$PREFIX"swupd_make_pack -S "$STATE_DIR" 0 $MIXVER $bundle done # step 4: hardlink relevant dirs