From: rhatto Date: Fri, 28 Nov 2008 18:10:44 +0000 (+0000) Subject: fix X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1f51a767ed556687e5bb5f6068390108bf9c2706;p=simplepkg.git fix git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@607 04377dda-e619-0410-9926-eae83683ac58 --- 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