[arch-projects] [MKINITCPIO][PATCH] Print pretty message if no help is defined in hook
Sebastien Luttringer
seblu at seblu.net
Sun Jun 26 13:31:25 EDT 2011
Thanks to Dave Reisner for having suggested!
Signed-off-by: Sebastien Luttringer <seblu at seblu.net>
---
mkinitcpio | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mkinitcpio b/mkinitcpio
index 6be7fbd..ad330a1 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -120,6 +120,7 @@ while getopts ':c:k:sb:g:p:m:nvH:LMhS:t:z:' arg; do
;;
H) [[ ! -r "${INSTDIR}/${OPTARG}" ]] && echo "No such hook: ${OPTARG}" && exit 1
. "${INSTDIR}/${OPTARG}";
+ [[ $(type -t help) != function ]] && echo "No help for hook ${OPTARG}" && exit 1
echo "Help for hook '${OPTARG}':"
help
exit 0 ;;
--
Sebastien "Seblu" Luttringer
More information about the arch-projects
mailing list