From 7adcb5abf01167ca62a7e916687335545b7d96f5 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 1 May 2024 16:47:35 -0700 Subject: [PATCH] support minor --- README.md | 7 +++++++ live-build.sh | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 37e4653..c6ecd83 100644 --- a/README.md +++ b/README.md @@ -84,3 +84,10 @@ The below uses EPEL instead if you do not wish to use SIG/Core. --description="./" \ --target-dir /builddir/lmc ``` + +On the other hand, you can run the live-build.sh script after setting up your +mock environment. + +``` +% bash live-build.sh --live-image XFCE --output-dir /builddir/xfce +``` diff --git a/live-build.sh b/live-build.sh index b1427e5..13dc97a 100755 --- a/live-build.sh +++ b/live-build.sh @@ -16,13 +16,14 @@ usage: $SCRNAME [OPTIONS] Options: -o, --output-dir DIR -l, --live-image NAME + -m, --minor NUM -p, --peridot ID # optional. will use peridot repos. -d, --debug # optional " -OPTS=$(getopt -a -n live-build -o l:,o:,p:,d,h \ - -l live-image:,output-dir:,peridot:,debug,help -- "$@") +OPTS=$(getopt -a -n live-build -o l:,o:,p:,m:,d,h \ + -l live-image:,output-dir:,peridot:,minor:,debug,help -- "$@") function is_in_path() { builtin type -P "${1}" @@ -38,6 +39,7 @@ while :; do -l | --live-image) LIVE="$2" ; shift 2 ;; -o | --output-dir) OUTPUTDIR="$2" ; shift 2 ;; -p | --peridot) PERIDOTID="$2" ; shift 2 ;; + -m | --minor) MINOR="$2" ; shift 2 ;; -d | --debug) DEBUG="--debug" ; shift ;; -h | --help) usage ;; --) shift ; break ;; @@ -91,6 +93,11 @@ function main() { switch_repo_to_peridot "${PERIDOTID}" fi + if [ -n "$MINOR" ]; then + sed -i "s/Rocky-9-/Rocky-9-$MINOR-/g" components/live/*.xml + sed -i "s/Rocky-9-/Rocky-9.$MINOR-/g" configs/rocky-live-*.xml + fi + kiwi-ng $DEBUG --type="iso" --profile="$LIVE-Live" --color-output system build --description="$SCRDIR" --target-dir "$OUTPUTDIR" }