From f7da3ea2076c8fda1f82a3e2d2bb0144d99d69e4 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Tue, 18 Feb 2014 16:04:07 -0600 Subject: [PATCH] only allow one cache at a time This will prevent the ~/.kpatch cache directory from filling up with old caches. --- kpatch-build/kpatch-build | 1 + 1 file changed, 1 insertion(+) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index 4ea3502..0f4473e 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -93,6 +93,7 @@ else rpm -ivh "$TEMPDIR/kernel-$DISTROVERSION.src.rpm" >> "$LOGFILE" 2>&1 || die rpmbuild -bp "--target=$(uname -m)" "$HOME/rpmbuild/SPECS/kernel.spec" >> "$LOGFILE" 2>&1 || die "rpmbuild -bp failed. you may need to run 'yum-builddep kernel' first." + rm -rf "$KSRCDIR_DIR" mkdir -p "$KSRCDIR_DIR" mv "$HOME"/rpmbuild/BUILD/kernel-*/linux-"$ARCHVERSION" "$KSRCDIR" >> "$LOGFILE" 2>&1 || die