summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-07-28 18:40:58 +0200
committerDave Reisner <dreisner@archlinux.org>2012-07-28 18:40:58 +0200
commit434c64cfaa91ae565c995691b1c71a4d007c6da8 (patch)
treefed220472c2ed86774f44e5cca3f8284b1fe60de
parent6a585950c5a014c35e449861b6b2040dca2d2516 (diff)
downloadmkinitcpio-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>
-rw-r--r--bash-completion2
-rwxr-xr-xmkinitcpio14
-rw-r--r--mkinitcpio.8.txt2
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 <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[@]}")
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.