fix parameters in create iso

This commit is contained in:
Tobias Powalowski 2022-02-09 09:32:56 +01:00
parent 154c75dcb4
commit 16dd2f454b
3 changed files with 3 additions and 5 deletions

View file

@ -3,7 +3,7 @@
source /usr/lib/archboot/functions source /usr/lib/archboot/functions
source /usr/lib/archboot/iso_functions source /usr/lib/archboot/iso_functions
[[ -z "${1}" ]] && _usage [[ -z "${1}" ]] && _usage
_parameters _parameters $*
_root_check _root_check
_aarch64_check _aarch64_check
[[ "${_GENERATE}" == "1" ]] || _usage [[ "${_GENERATE}" == "1" ]] || _usage

View file

@ -3,7 +3,7 @@
source /usr/lib/archboot/functions source /usr/lib/archboot/functions
source /usr/lib/archboot/iso_functions source /usr/lib/archboot/iso_functions
[[ -z "${1}" ]] && _usage [[ -z "${1}" ]] && _usage
_parameters _parameters $*
_root_check _root_check
_x86_64_check _x86_64_check
[[ "${_GENERATE}" == "1" ]] || _usage [[ "${_GENERATE}" == "1" ]] || _usage

View file

@ -20,7 +20,6 @@ _usage () {
echo " /etc/archboot/presets locates the presets" echo " /etc/archboot/presets locates the presets"
echo " default=x86_64" echo " default=x86_64"
echo " -i=IMAGENAME Your IMAGENAME." echo " -i=IMAGENAME Your IMAGENAME."
echo " -r=RELEASENAME Use RELEASENAME in boot message."
echo " -h This message." echo " -h This message."
exit 0 exit 0
} }
@ -28,10 +27,9 @@ _usage () {
_parameters() { _parameters() {
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case ${1} in case ${1} in
-g|--g) _GENERATE="1" ;; -g|--g) export _GENERATE="1" ;;
-p=*|--p=*) _PRESET="$(echo "${1}" | awk -F= '{print $2;}')" ;; -p=*|--p=*) _PRESET="$(echo "${1}" | awk -F= '{print $2;}')" ;;
-i=*|--i=*) _IMAGENAME="$(echo "${1}" | awk -F= '{print $2;}')" ;; -i=*|--i=*) _IMAGENAME="$(echo "${1}" | awk -F= '{print $2;}')" ;;
-r=*|--r=*) _RELEASENAME="$(echo "${1}" | awk -F= '{print $2;}')" ;;
-h|--h|?) usage ;; -h|--h|?) usage ;;
*) _usage ;; *) _usage ;;
esac esac