From 1f51a767ed556687e5bb5f6068390108bf9c2706 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 28 Nov 2008 18:10:44 +0000 Subject: fix git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@607 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/createpkg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'trunk') diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 544eb72..e30cb80 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -341,7 +341,7 @@ function remove_old_package_data { # Remove old packages from repository tree # usage: remove_old_package_data - if [ -z "$1" ]; then + if [ ! -d "$1" ]; then return 1 fi @@ -394,7 +394,8 @@ function remove_old_package_data { else # Using -mindepth 2 so it doesn't delete the new PACKAGE - find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.tgz" -o -name "$PACKAGE-*-*-*.meta" -exec rm {} 2>/dev/null \; + find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.tgz" -exec rm {} 2>/dev/null \; + find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.meta" -exec rm {} 2>/dev/null \; find $makepkg_repos -name "$PACKAGE.slack-required" -exec rm {} 2>/dev/null \; fi fi -- cgit v1.2.3