]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
fix
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 28 Nov 2008 18:10:44 +0000 (18:10 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 28 Nov 2008 18:10:44 +0000 (18:10 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@607 04377dda-e619-0410-9926-eae83683ac58

trunk/src/createpkg

index 544eb721e15a704172603da7f793e6395e71a1bd..e30cb80d4ec90ac396df3d8de70131af283c2433 100644 (file)
@@ -341,7 +341,7 @@ function remove_old_package_data {
   # Remove old packages from repository tree
   # usage: remove_old_package_data <repository_folder>
 
-  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