]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
small fix
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 1 Feb 2007 01:43:28 +0000 (01:43 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 1 Feb 2007 01:43:28 +0000 (01:43 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@150 04377dda-e619-0410-9926-eae83683ac58

simplepkg.SlackBuild
src/simplaret

index 52a3effafea0d7e42f9998b341e7dca23b139e08..110f8b252e922ee97f459f1d3da54b81db0c3bf1 100755 (executable)
@@ -6,7 +6,7 @@
 PACKAGE="simplepkg"
 PACK_DIR="package-$PACKAGE"
 BUILD=${BUILD:=1rha}
-VERSION="0.4.9pre21"
+VERSION="0.4.9pre22"
 ARCH="noarch"
 LIBEXEC="/usr/libexec/$PACKAGE"
 BINDIR="/usr/bin"
index 4b472b82289b19fcb24ec09bb6ebbcd36594909c..d9fd1c83a403b978bb9bd41af351c264884cabc0 100755 (executable)
@@ -504,16 +504,18 @@ function simplaret_get {
       simplaret_download $repository_url $file $folder
 
       if [ ! -f "$folder/$candidate" ]; then
+        LAST_DONWLOADED_PACKAGE="0"
         if [ "$2" != "--silent" ]; then
           echo Error downloading $candidate from $repos_type repository $repository_url, please check your settings
         fi
         return 1
       else
+        LAST_DONWLOADED_PACKAGE="$folder/$candidate"
         if [ "$2" != "--silent" ]; then
           silent=""
           echo Package $candidate stored at $folder
         else
-          echo $folder/$candidate
+          echo $folder/$candidate
           silent="--silent"
         fi
         simplaret_checksum $storage/$repository_name/CHECKSUMS.md5 $folder/$candidate $silent
@@ -767,17 +769,22 @@ function simplaret_install {
     fi
   fi
 
-  package="`simplaret_get $1 --silent`"
+  # package="`simplaret_get $1 --silent`"
+  simplaret_get $1 --silent
+  package="$LAST_DONWLOADED_PACKAGE"
 
-  if [ "$?" == "0" ] && [ ! -z "$package" ]; then
+  if [ "$package" != "0" ] && [ ! -z "$package" ]; then
     if [ -f "$package" ]; then
       ROOT=$root upgradepkg --install-new $package
+      LAST_DONWLOADED_PACKAGE="0"
     else
       echo "error: could not install package $1: file not found"
+      LAST_DONWLOADED_PACKAGE="0"
       return 1
     fi
   else
     echo "error: could not install package $1"
+    LAST_DONWLOADED_PACKAGE="0"
     return 1
   fi