diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-05-05 19:01:50 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-05-05 19:01:50 +0200 |
commit | 4fc2b402adbbe6bd1c936e509ad6736e92168396 (patch) | |
tree | aa4fa5403d93f9b48c73a082401ed0bf01df1a71 | |
parent | f486b7ed6f8e289c8d897fcaeac7a0f52c7493c0 (diff) | |
download | mkinitcpio-4fc2b402adbbe6bd1c936e509ad6736e92168396.tar.gz mkinitcpio-4fc2b402adbbe6bd1c936e509ad6736e92168396.tar.xz |
Added -L param, to list available hooks
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@69 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | mkinitcpio | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -38,12 +38,13 @@ usage () echo " -g IMAGE Generate a cpio image as IMAGE. default: no" echo " -a NAME Append to an existing filelist. default: no" echo " -v Verbose output. Default: no" + echo " -L List all available hooks." echo " -H HOOKNAME Output help for hook 'HOOKNAME'." echo " -h This message." exit 1 } -while getopts 'c:k:s:b:g:a:H:hv' arg; do +while getopts 'c:k:s:b:g:a:H:hvL' arg; do case "$arg" in c) CONFIG="$OPTARG" ;; k) KERNELVERSION="$OPTARG" ;; @@ -56,6 +57,11 @@ while getopts 'c:k:s:b:g:a:H:hv' arg; do echo "Help for hook '${OPTARG}':" help exit 0 ;; + L) echo "Available hooks: " + for h in ${INSTDIR}/*; do + echo " $(basename ${h})" + done + exit 0 ;; h|?) usage ;; *) echo "invalid argument '$arg'"; usage ;; esac |