summaryrefslogtreecommitdiff
path: root/gitstatus/build
diff options
context:
space:
mode:
Diffstat (limited to 'gitstatus/build')
-rwxr-xr-xgitstatus/build7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitstatus/build b/gitstatus/build
index 25dbb5e9..2cb63f74 100755
--- a/gitstatus/build
+++ b/gitstatus/build
@@ -56,9 +56,12 @@ appname=gitstatusd-"$gitstatus_kernel"-"$gitstatus_arch"
libgit2_tmp="$outdir"/deps/"$appname".libgit2.tmp
cleanup() {
- cd /
- command rm -rf -- "$workdir" "$outdir"/usrbin/"$appname".tmp "$libgit2_tmp"
trap - INT QUIT TERM ILL PIPE
+ cd /
+ if ! command rm -rf -- "$workdir" "$outdir"/usrbin/"$appname".tmp "$libgit2_tmp"; then
+ command sleep 5
+ command rm -rf -- "$workdir" "$outdir"/usrbin/"$appname".tmp "$libgit2_tmp"
+ fi
}
trap cleanup INT QUIT TERM ILL PIPE