diff options
-rwxr-xr-x | mkinitcpio | 54 |
1 files changed, 36 insertions, 18 deletions
@@ -355,64 +355,82 @@ while :; do shift IFS=, read -r -a add <<< "$1" _optaddhooks+=("${add[@]}") - unset add ;; + unset add + ;; -c|--config) shift - _f_config=$1 ;; + _f_config=$1 + ;; -k|--kernel) shift - _optkver=$1 ;; + _optkver=$1 + ;; -s|--save) - _optsavetree=1 ;; + _optsavetree=1 + ;; -g|--generate) shift [[ -d $1 ]] && die "Invalid image path -- must not be a directory" if ! _optgenimg=$(readlink -f "$1") || [[ ! -e ${_optgenimg%/*} ]]; then die "Unable to write to path: \`%s'" "$1" - fi ;; + fi + ;; -h|--help) usage - cleanup 0 ;; + cleanup 0 + ;; -V|--version) version - cleanup 0 ;; + cleanup 0 + ;; -p|--preset) shift - _optpreset+=("$1") ;; + _optpreset+=("$1") + ;; -n|--nocolor) - _optcolor=0 ;; + _optcolor=0 + ;; -v|--verbose) - _optquiet=0 ;; + _optquiet=0 + ;; -S|--skiphooks) shift IFS=, read -r -a skip <<< "$1" _optskiphooks+=("${skip[@]}") - unset skip ;; + unset skip + ;; -H|--hookhelp) shift hook_help "$1" - exit ;; + exit + ;; -L|--listhooks) hook_list - exit 0 ;; + exit 0 + ;; -M|--automods) - _optshowautomods=1 ;; + _optshowautomods=1 + ;; -P|--allpresets) _optpreset=("$_d_presets"/*.preset) [[ -e ${_optpreset[0]} ]] || die "No presets found in $_d_presets" ;; -t|--builddir) shift - export TMPDIR=$1 ;; + export TMPDIR=$1 + ;; -z|--compress) shift - _optcompress=$1 ;; + _optcompress=$1 + ;; -r|--moduleroot) shift - _optmoduleroot=$1 ;; + _optmoduleroot=$1 + ;; --) shift - break 2 ;; + break 2 + ;; esac shift done |