From 156fd5310e3dc881716a97d97a3ed2c7feb9cb8c Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Tue, 24 Oct 2023 21:31:03 +0200 Subject: [PATCH] Add emtpy customize stage for freebsd --- guestfish/freebsd12 | 1 + guestfish/freebsd13/run.sh | 3 +++ guestfish/run.sh | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 120000 guestfish/freebsd12 create mode 100755 guestfish/freebsd13/run.sh diff --git a/guestfish/freebsd12 b/guestfish/freebsd12 new file mode 120000 index 00000000..967d9b28 --- /dev/null +++ b/guestfish/freebsd12 @@ -0,0 +1 @@ +freebsd13 \ No newline at end of file diff --git a/guestfish/freebsd13/run.sh b/guestfish/freebsd13/run.sh new file mode 100755 index 00000000..7570df9f --- /dev/null +++ b/guestfish/freebsd13/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "[INFO] Empty customize stage, creating symlink $DIR_EXPORT/$1.qcow2 -> $DIR_INSTALL/$1" +( cd $DIR_EXPORT; ln -f -s ../../$DIR_INSTALL/$1.qcow2 $1-$VERSION-$RELEASE.qcow2 ) diff --git a/guestfish/run.sh b/guestfish/run.sh index 62f217f8..f794a724 100755 --- a/guestfish/run.sh +++ b/guestfish/run.sh @@ -4,8 +4,15 @@ DISTRO=$1 DST_IMG=$2 SRC_IMG=${DIR_INSTALL}/$DISTRO.qcow2 DIR_CURR=$(dirname "$0") - GUESTFISH_WORKING_DIR=$DIR_BUILD/_guestfish/$DISTRO + +# Run distro-specific run.sh and exit +if [ -e $DIR_CURR/$DISTRO/run.sh ]; then + $DIR_CURR/$DISTRO/run.sh $@ + exit $? +fi + +# OR continue with default run.sh mkdir -p "$GUESTFISH_WORKING_DIR" # Create image working copy