fix: ensure src-old is always removed on exit
This commit is contained in:
parent
131c15e715
commit
9a6ac8303b
1 changed files with 6 additions and 1 deletions
7
apatch
7
apatch
|
@ -1,5 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
cleanup() {
|
||||
rm -rf src-old
|
||||
}
|
||||
|
||||
trap 'cleanup' EXIT INT HUP
|
||||
|
||||
startdir="$PWD"
|
||||
|
||||
[ -f APKBUILD ] || ( echo "please run this in a package directory"; exit 1 )
|
||||
|
@ -32,4 +38,3 @@ done
|
|||
)
|
||||
|
||||
busybox diff -U3 -r "src-old$builddir" "src$builddir" | sed "s|src-old$builddir|a|g;s|src$builddir|b|g" > $1
|
||||
rm -rf src-old
|
||||
|
|
Loading…
Reference in a new issue