mirror of https://github.com/dynup/kpatch
kpatch-build: create applied-patch only after verifying patch
Create the applied-patch file only after the patch has been verified. Otherwise if you accidentally supply a patch which had already been applied to the source, the cleanup trap won't reverse apply it when exiting the script.
This commit is contained in:
parent
7fe5c3fef4
commit
5a999ef68c
|
@ -184,8 +184,8 @@ fi
|
|||
|
||||
echo "Testing patch file"
|
||||
cd "$SRCDIR" || die
|
||||
patch -N -p1 < "$PATCHFILE" || die "source patch file failed to apply"
|
||||
cp "$PATCHFILE" "$APPLIEDPATCHFILE" || die
|
||||
patch -N -p1 < "$APPLIEDPATCHFILE" || die "source patch file failed to apply"
|
||||
patch -p1 -R < "$APPLIEDPATCHFILE" &> /dev/null || die "reverse patch apply failed"
|
||||
|
||||
echo "Building original kernel"
|
||||
|
|
Loading…
Reference in New Issue