]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
fixes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 27 Nov 2008 17:25:45 +0000 (17:25 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 27 Nov 2008 17:25:45 +0000 (17:25 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@544 04377dda-e619-0410-9926-eae83683ac58

trunk/lib/common.sh
trunk/src/createpkg

index 1ce83810d2dc8cab39ae10320073d7c9bfec0dee..857d01e0130091bd9ea1a96eeb14ee0f4da4388e 100644 (file)
@@ -365,7 +365,7 @@ function default_distro {
     fi
   else
     if [ -f "$1/etc/slackware-version" ]; then
-      cat $1/etc/slackware-version | awk '{ print $1 }'
+      cat $1/etc/slackware-version | awk '{ print $1 }' | tr '[[:upper:]]' '[[:lower:]]'
     else
       echo slackware
     fi
index 6e978eb17e8208ef1a2ce276ab46f2bb2d624dbb..26617883adc3b49fa282939e20858299324ae324 100644 (file)
@@ -535,10 +535,10 @@ fi
 if [ $REMOVE_OLD_PACKAGE -eq $on ]; then
 
   # Using subversion
-  if [ -d "`basename $NEW_REPOS`/.svn" ]; then
+  if [ -d "$MAKEPKG_REPOS/.svn" ]; then
 
     cwd="`pwd`"
-    cd `basename $NEW_REPOS`
+    cd $MAKEPKG_REPOS
 
     PACKAGE_VERSION="`package_version $PKG_NAME`"
     PACKAGE_ARCH="`package_arch $PKG_NAME`"
@@ -546,12 +546,14 @@ if [ $REMOVE_OLD_PACKAGE -eq $on ]; then
 
     for file in `ls $PACKAGE-*-*-*.tgz`; do
       if svn_check $file; then
-        # Just deleted packages with different arch, version or build number
+        # Just delete packages with different arch, version or build number
         if [ "`package_version $file`" != "$PACKAGE_VERSION" ] || \
            [ "`package_arch $file`" != "$PACKAGE_ARCH" ] || \
            [ "`package_build $file`" != "$PACKAGE_BUILD" ]; then
           svn del --force $file
         fi
+      else
+        rm $file
       fi
     done
 
@@ -564,26 +566,28 @@ fi
 
 # Move package to SlackBuilds-like tree
 if [ $MOVE_BIN_PACKAGE -eq $on ]; then 
+
   mv $MAKEPKG_REPOS/$PKG_NAME $NEW_REPOS/
-  if [ -d "`basename $NEW_REPOS`/.svn" ]; then
+  if [ -d "$NEW_REPOS/.svn" ]; then
     cwd="`pwd`"
-    cd `basename $NEW_REPOS`
+    cd $NEW_REPOS
     svn add $PKG_NAME
     cd $cwd
   fi
-fi
 
-# Move package's slack-required to binary repository
-if [ $MOVE_SLACK_REQUIRED -eq $on ]; then
-  if [ ! -z "$SLACK_REQUIRED" ]; then
-    cp $SLACK_REQUIRED $NEW_REPOS/$PACKAGE.slack-required
-    if ! svn_check $NEW_REPOS/$PACKAGE.slack-required; then
-      cwd="`pwd`"
-      cd `basename $NEW_REPOS`
-      svn add $PACKAGE.slack-required
-      cd $cwd
+  # Move package's slack-required to binary repository
+  if [ $MOVE_SLACK_REQUIRED -eq $on ]; then
+    if [ ! -z "$SLACK_REQUIRED" ]; then
+      cp $SLACK_REQUIRED $NEW_REPOS/$PACKAGE.slack-required
+      if [ -d "$NEW_REPOS/.svn" ] && ! svn_check $NEW_REPOS/$PACKAGE.slack-required; then
+        cwd="`pwd`"
+        cd $NEW_REPOS
+        svn add $PACKAGE.slack-required
+        cd $cwd
+      fi
     fi
   fi
+
 fi
 
 # Install package