summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupdate-kernel24
1 files changed, 15 insertions, 9 deletions
diff --git a/update-kernel b/update-kernel
index a57d04e..3067474 100755
--- a/update-kernel
+++ b/update-kernel
@@ -46,7 +46,7 @@ fail()
usage()
{
- echo "usage: $script [-v] [-s server] [-B branch]" >&2
+ echo "usage: $script [-vn] [-s server] [-B branch]" >&2
exit 2
}
@@ -56,12 +56,16 @@ version=`uname -r | sed -En 's/^([.0-9]+).*/\1/p'`
branch="RELENG_`echo $version | tr '.' '_'`"
csup="csup -L0"
patch="patch -s"
+patches="YES"
-while getopts "B:s:v" arg; do
+while getopts "B:ns:v" arg; do
case $arg in
B)
branch="$OPTARG"
;;
+ n)
+ patches="NO"
+ ;;
s)
server="$OPTARG"
;;
@@ -110,11 +114,13 @@ EOF
# Only allow up to 10 files to be deleted
$csup -d 10 $supfile
-# Allow globbing from here on out
-set +f
+if is_yes $patches; then
+ # Allow globbing from here on out
+ set +f
-for file in $patchdir/*; do
- if [ -f "$file" ]; then
- $patch -d /usr/src -t -p0 < $file
- fi
-done
+ for file in $patchdir/*; do
+ if [ -f "$file" ]; then
+ $patch -d /usr/src -t -p0 < $file
+ fi
+ done
+fi