From 431ee18f928bdd12bc4505dab63d875a198cf3c7 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 6 Oct 2009 19:27:52 +0000 Subject: Better status updates when kernel updating --- update-kernel | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/update-kernel b/update-kernel index 3067474..951209e 100755 --- a/update-kernel +++ b/update-kernel @@ -54,11 +54,12 @@ supfile=/usr/src/cvsupfile-sys server="cvsup2.FreeBSD.org" version=`uname -r | sed -En 's/^([.0-9]+).*/\1/p'` branch="RELENG_`echo $version | tr '.' '_'`" -csup="csup -L0" -patch="patch -s" +csup="csup -L2" +patch="patch" +printf="printf" patches="YES" -while getopts "B:ns:v" arg; do +while getopts "B:ns:qv" arg; do case $arg in B) branch="$OPTARG" @@ -69,9 +70,11 @@ while getopts "B:ns:v" arg; do s) server="$OPTARG" ;; + q) + csup="csup -L0" + printf="true" + ;; v) - patch="patch" - csup="csup -L2" ;; *) usage @@ -118,9 +121,13 @@ if is_yes $patches; then # Allow globbing from here on out set +f - for file in $patchdir/*; do + cd $patchdir + for file in *; do if [ -f "$file" ]; then - $patch -d /usr/src -t -p0 < $file + printf "Applying $file\n" + $patch -d /usr/src -p0 \ + --forward --quiet --batch --fuzz=0 < $file fi done fi +$printf "Done\n" -- cgit v1.2.3