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 <tudor.marcu@intel.com>
This commit is contained in:
Tudor Marcu
2016-03-24 01:13:18 -07:00
parent f98416365b
commit e2394792b3
+8 -4
View File
@@ -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