Skip to content

Commit

Permalink
deploy: Make "extra" directory conditional
Browse files Browse the repository at this point in the history
Only add the "extra" directory when extra-manifest is present.  xorriso
fails when a non-existant directory is present, so only inlucde it when
its populated.

Signed-off-by: Jason Andryuk <[email protected]>
  • Loading branch information
jandryuk authored and dpsmith committed Apr 12, 2024
1 parent dd9ec7a commit 6d0341a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cmds/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ deploy_iso_legacy() {
local iso_name="openxt-installer.iso"
local iso_path="${DEPLOY_DIR}/${iso_name}"

local STAGING_EXTRA=""
if [ -e "$CONF_DIR/extra-manifest" ] ; then
STAGING_EXTRA="${STAGING_DIR}/extra"
fi

if ! genisoimage -o "${iso_path}" \
-b "isolinux/isolinux.bin" -c "isolinux/boot.cat" \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-r -J -l -V "OpenXT ${OPENXT_RELEASE} installer." \
"${STAGING_DIR}/iso" \
"${STAGING_DIR}/extra" \
$STAGING_EXTRA \
"${STAGING_DIR}/repository"
then
echo "genisoimage failed."
Expand All @@ -34,6 +39,11 @@ deploy_iso() {
local iso_name="openxt-installer.iso"
local iso_path="${DEPLOY_DIR}/${iso_name}"

local STAGING_EXTRA=""
if [ -e "$CONF_DIR/extra-manifest" ] ; then
STAGING_EXTRA="${STAGING_DIR}/extra"
fi

if ! command_sane "xorriso" "libisoburn"; then
return 1
fi
Expand All @@ -57,7 +67,7 @@ deploy_iso() {
-f \
-quiet \
"${STAGING_DIR}/iso" \
"${STAGING_DIR}/extra" \
$STAGING_EXTRA \
"${STAGING_DIR}/repository"

echo "ISO created: $iso_path"
Expand Down

0 comments on commit 6d0341a

Please sign in to comment.