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" }