aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-05-29 22:28:05 +0200
committerMartin Willi <martin@revosec.ch>2015-07-12 13:54:08 +0200
commita4a13d0be29b716663e48c406c265cc6c07c6414 (patch)
tree0ce882f09dc7477661cfb70116477882e3dc82fe
parent6f913def3c199c18f062315c4cb015e573f0e899 (diff)
downloadstrongswan-a4a13d0be29b.tar.bz2
strongswan-a4a13d0be29b.tar.xz
testing: Extract and patch each kernel version only once
This allows us to do modifications to the kernel tree and rebuild that kernel using make-testing. We can even have a git kernel tree in a directory to do kernel development.
-rwxr-xr-xtesting/scripts/build-guestkernel19
1 files changed, 11 insertions, 8 deletions
diff --git a/testing/scripts/build-guestkernel b/testing/scripts/build-guestkernel
index 17f22bd83..f7f3cce61 100755
--- a/testing/scripts/build-guestkernel
+++ b/testing/scripts/build-guestkernel
@@ -26,18 +26,21 @@ then
execute "wget -q $url"
fi
-log_action "Unpacking kernel"
-execute "tar xJf $KERNELTARBALL"
-
KERNELDIR=$BUILDDIR/$KERNEL
cd $KERNELDIR
-if [ $KERNELPATCH ]
+if [ ! -d "$KERNELDIR" ]
then
- log_action "Applying kernel patch"
- bzcat ../$KERNELPATCH | patch -p1 >>$LOGFILE 2>&1
- log_status $?
- [ $? -eq 0 ] || exit 1
+ log_action "Unpacking kernel"
+ execute "tar xJf $KERNELTARBALL"
+
+ if [ $KERNELPATCH ]
+ then
+ log_action "Applying kernel patch"
+ bzcat ../$KERNELPATCH | patch -p1 >>$LOGFILE 2>&1
+ log_status $?
+ [ $? -eq 0 ] || exit 1
+ fi
fi
execute "cp $KERNELCONFIG .config" 0