Skip to contentSkip to conversation

patch-kernel script usage help

PATCH Damjan Lango 1 participant 1 message Mar 7, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

Would you consider applying this patch that adds a little usage help to the patch-kernel script if the Makefile isn't found or if it is given -h or --help options:

ciao
Damjan

patch-kernel renamed from patch-kernel-orig +9 -0
diff -u patch-kernel-orig patch-kernel
@@ -46,6 +46,15 @@
 patchdir=${2-.}
 stopvers=${3-imnotaversion}
 
+if [ "$1" = -h -o "$1" = --help -o ! -r "$sourcedir/Makefile" ]; then
+cat << USAGE
+usage: patch-kernel [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
+  The source directory defaults to /usr/src/linux, and
+  the patch directory defaults to the current directory.
+USAGE
+exit 1
+fi
+
 # See if we have any -ac options
 for PARM in $*
 do