summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Luttringer <seblu@seblu.net>2011-06-26 19:29:13 +0200
committerSebastien Luttringer <seblu@seblu.net>2011-06-26 23:15:56 +0200
commit643da24974067821638fd27d0f9685dffb525f21 (patch)
tree41c92369ae7031fc08e61a30eb46805483bb7e81
parent3a65dbdaf17ff26691559fd224e66b2fbe3eee7c (diff)
downloadmkinitcpio-643da24974067821638fd27d0f9685dffb525f21.tar.gz
mkinitcpio-643da24974067821638fd27d0f9685dffb525f21.tar.xz
Print pretty message if no help is defined in hook
Thanks to Dave Reisner for having suggested! Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
-rwxr-xr-xmkinitcpio4
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 ;;