diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-07-28 18:40:58 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-07-28 18:40:58 +0200 |
commit | 434c64cfaa91ae565c995691b1c71a4d007c6da8 (patch) | |
tree | fed220472c2ed86774f44e5cca3f8284b1fe60de /mkinitcpio | |
parent | 6a585950c5a014c35e449861b6b2040dca2d2516 (diff) | |
download | mkinitcpio-434c64cfaa91ae565c995691b1c71a4d007c6da8.tar.gz mkinitcpio-434c64cfaa91ae565c995691b1c71a4d007c6da8.tar.xz |
mkinitcpio: rename longopt for --add to --addhooks
Rename this option so that it mirrors the longopt name for -S,
--skiphooks. The original --add option remains behind in the option
parser for backwards compatability, but no other references remain.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-x | mkinitcpio | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -35,7 +35,7 @@ mkinitcpio $version usage: ${0##*/} [options] Options: - -A, --add <hooks> Add specified hooks, comma separated, to image + -A, --addhooks <hooks> Add specified hooks, comma separated, to image -c, --config <config> Use alternate config file. (default: /etc/mkinitcpio.conf) -g, --generate <path> Generate cpio image and write to specified path -H, --hookhelp <hookname> Display help for given hook and exit @@ -125,18 +125,18 @@ trap 'cleanup 130' INT trap 'cleanup 143' TERM OPT_SHORT='A:c:g:H:hk:mnLMp:r:S:st:vz:' -OPT_LONG=('add:' 'config:' 'generate:' 'hookhelp:' 'help' 'kernel:' 'listhooks' 'automods' - 'moduleroot:' 'nocolor' 'preset:' 'skiphooks:' 'save' 'builddir:' 'verbose' 'compress:') +OPT_LONG=('add:' 'addhooks:' 'config:' 'generate:' 'hookhelp:' 'help' + 'kernel:' 'listhooks' 'automods' 'moduleroot:' 'nocolor' + 'preset:' 'skiphooks:' 'save' 'builddir:' 'verbose' 'compress:') -if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then - exit 1 -fi +parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@" || exit 1 set -- "${OPTRET[@]}" unset OPT_SHORT OPT_LONG OPTRET while :; do case $1 in - -A|--add) + # --add remains for backwards compat + -A|--add|--addhooks) shift IFS=, read -r -a add <<< "$1" ADDHOOKS+=("${add[@]}") |