From 434c64cfaa91ae565c995691b1c71a4d007c6da8 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 28 Jul 2012 12:40:58 -0400 Subject: 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 --- bash-completion | 2 +- mkinitcpio | 14 +++++++------- mkinitcpio.8.txt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bash-completion b/bash-completion index 6d21fd8..e56cd6c 100644 --- a/bash-completion +++ b/bash-completion @@ -54,7 +54,7 @@ _files_from_dirs() { _mkinitcpio() { local action cur prev opts - opts=(-A --add -c --config -g --generate -H --hookhelp -h --help -k --kernel + opts=(-A --addhooks -c --config -g --generate -H --hookhelp -h --help -k --kernel -L --listhooks -M --automods -n --nocolor -p --preset -r --moduleroot -S --skiphooks -s --save -t --builddir -v --verbose -z --compress) diff --git a/mkinitcpio b/mkinitcpio index f70801c..5fec347 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -35,7 +35,7 @@ mkinitcpio $version usage: ${0##*/} [options] Options: - -A, --add Add specified hooks, comma separated, to image + -A, --addhooks Add specified hooks, comma separated, to image -c, --config Use alternate config file. (default: /etc/mkinitcpio.conf) -g, --generate Generate cpio image and write to specified path -H, --hookhelp 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[@]}") diff --git a/mkinitcpio.8.txt b/mkinitcpio.8.txt index fa30b30..09ebae0 100644 --- a/mkinitcpio.8.txt +++ b/mkinitcpio.8.txt @@ -24,7 +24,7 @@ other features. Options ------- -*-A, \--add* 'hooks':: +*-A, \--addhooks* 'hooks':: Add the additional 'hooks' to the image. These will be processed in order after all other hooks from the config file. Multiple hooks should be comma-separated. This option can be specified multiple times. -- cgit v1.2.3-24-g4f1b