From d48758fd1a0b6777bcd0316df7e14578f776ec02 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 6 Oct 2009 16:08:56 +0000 Subject: Add option to not build patches --- update-kernel | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'update-kernel') 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 -- cgit v1.2.3