From 403cf65b89a0f89aaa9c7407ab0e2c0967ec5fe7 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Mon, 30 Jun 2014 14:18:22 -0500 Subject: [PATCH] kpatch-build: don't remove USERSRCDIR Fixes #279. --- kpatch-build/kpatch-build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index 4335a77..04765a3 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -78,7 +78,8 @@ cleanup() { } clean_cache() { - rm -rf "$SRCDIR" "$OBJDIR" "$OBJDIR2" "$VERSIONFILE" + [[ -z $USERSRCDIR ]] && rm -rf "$SRCDIR" + rm -rf "$OBJDIR" "$OBJDIR2" "$VERSIONFILE" mkdir -p "$OBJDIR" }