allow peridot repos to be used
This commit is contained in:
parent
acd5a4d17d
commit
f4ed5d5b0a
@ -16,12 +16,13 @@ usage: $SCRNAME [OPTIONS]
|
|||||||
Options:
|
Options:
|
||||||
-o, --output-dir DIR
|
-o, --output-dir DIR
|
||||||
-l, --live-image NAME
|
-l, --live-image NAME
|
||||||
|
-p, --peridot ID # optional. will use peridot repos.
|
||||||
-d, --debug # optional
|
-d, --debug # optional
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
||||||
OPTS=$(getopt -a -n live-build -o l:,o:,d,h \
|
OPTS=$(getopt -a -n live-build -o l:,o:,p:,d,h \
|
||||||
-l live-image:,output-dir:,debug,help -- "$@")
|
-l live-image:,output-dir:,peridot:,debug,help -- "$@")
|
||||||
|
|
||||||
function is_in_path() {
|
function is_in_path() {
|
||||||
builtin type -P "${1}"
|
builtin type -P "${1}"
|
||||||
@ -36,6 +37,7 @@ while :; do
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
-l | --live-image) LIVE="$2" ; shift 2 ;;
|
-l | --live-image) LIVE="$2" ; shift 2 ;;
|
||||||
-o | --output-dir) OUTPUTDIR="$2" ; shift 2 ;;
|
-o | --output-dir) OUTPUTDIR="$2" ; shift 2 ;;
|
||||||
|
-p | --peridot) PERIDOTID="$2" ; shift 2 ;;
|
||||||
-d | --debug) DEBUG="--debug" ; shift ;;
|
-d | --debug) DEBUG="--debug" ; shift ;;
|
||||||
-h | --help) usage ;;
|
-h | --help) usage ;;
|
||||||
--) shift ; break ;;
|
--) shift ; break ;;
|
||||||
@ -64,6 +66,19 @@ if [ "$ret_val" -ne "0" ]; then
|
|||||||
exit 32
|
exit 32
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function switch_repo_to_peridot() {
|
||||||
|
ID="$1"
|
||||||
|
# https://yumrepofs.build.resf.org/v1/projects/${ID}/repo/
|
||||||
|
pushd repositories || { echo "not found"; exit 1; }
|
||||||
|
sed -i "s;ZZ_INTERNAL_BaseOS_REPO_URL_ZZ;https://yumrepofs.build.resf.org/v1/projects/${ID}/repo/BaseOS/\$basearch;g" core-peridot.xml
|
||||||
|
sed -i "s;ZZ_INTERNAL_AppStream_REPO_URL_ZZ;https://yumrepofs.build.resf.org/v1/projects/${ID}/repo/AppStream/\$basearch;g" core-peridot.xml
|
||||||
|
sed -i "s;ZZ_INTERNAL_CRB_REPO_URL_ZZ;https://yumrepofs.build.resf.org/v1/projects/${ID}/repo/CRB/\$basearch;g" core-peridot.xml
|
||||||
|
sed -i "s;ZZ_INTERNAL_extras_REPO_URL_ZZ;https://yumrepofs.build.resf.org/v1/projects/${ID}/repo/extras/\$basearch;g" core-peridot.xml
|
||||||
|
rm core.xml
|
||||||
|
ln -s core-peridot.xml core.xml
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
/bin/rm config.xml
|
/bin/rm config.xml
|
||||||
if [ ! -f "configs/rocky-live-${LIVE,,}.xml" ]; then
|
if [ ! -f "configs/rocky-live-${LIVE,,}.xml" ]; then
|
||||||
@ -71,6 +86,11 @@ function main() {
|
|||||||
exit 42
|
exit 42
|
||||||
fi
|
fi
|
||||||
ln -s "configs/rocky-live-${LIVE,,}.xml" config.xml
|
ln -s "configs/rocky-live-${LIVE,,}.xml" config.xml
|
||||||
|
|
||||||
|
if [ -n "$PERIDOTID" ]; then
|
||||||
|
switch_repo_to_peridot "${PERIDOTID}"
|
||||||
|
fi
|
||||||
|
|
||||||
kiwi-ng "$DEBUG" --type="iso" --profile="$LIVE-Live" --color-output system build --description="$SCRDIR" --target-dir "$OUTPUTDIR"
|
kiwi-ng "$DEBUG" --type="iso" --profile="$LIVE-Live" --color-output system build --description="$SCRDIR" --target-dir "$OUTPUTDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user