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