]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
simplepkg 0.4.9pre12
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sat, 27 Jan 2007 21:42:47 +0000 (21:42 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sat, 27 Jan 2007 21:42:47 +0000 (21:42 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@129 04377dda-e619-0410-9926-eae83683ac58

doc/CHANGELOG
lib/common.sh
simplepkg.SlackBuild
src/simplaret

index 341f1f30f866e6e24ad2ef59c6a862383b5db0c2..2549f5da3126ebafca5d9752171be4c5f27942da 100644 (file)
@@ -1,9 +1,7 @@
 simplepkg changelog
 -------------------
 
-0.4.9pre10: small fixes
-
-0.4.9pre11: small fixes
+0.4.9pre10-12: small fixes
 
 0.4.9pre9: createpkg:
              - speedup
index fccca64b1fdbc854e8522e10fb5918fc52587286..3411f2c82444b3d6b252b4bbb2a2d62e115b8b55 100644 (file)
@@ -151,7 +151,7 @@ function eval_parameter {
   # return the evaluated parameter if available or $2 $3 ... $n
 
   if grep -qe "^$1=" $CONF; then
-    grep -e "^$1=" $CONF | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/#.*$//'
+    grep -e "^$1=" $CONF | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//'
   else
     shift
     echo $*
index bd3af330aa63b5aab070aa95152f83785d20b63f..34ac27a976efbd037f669a7df0ce4aef399b4e34 100755 (executable)
@@ -6,7 +6,7 @@
 PACKAGE="simplepkg"
 PACK_DIR="package-$PACKAGE"
 BUILD=${BUILD:=1rha}
-VERSION="0.4.9pre11"
+VERSION="0.4.9pre12"
 ARCH="noarch"
 LIBEXEC="/usr/libexec/$PACKAGE"
 BINDIR="/usr/bin"
index 500e4564884e0bc57e7aebb2eaaebc98d3c14424..d3dc24f2a53400421490a331aa42bea20429d7cf 100755 (executable)
@@ -87,16 +87,16 @@ function simplaret_download {
   fi
 
   if [ "$protocol" == "http" ]; then
-    (cd $3 && wget $wget_timeout $1/$2)
+    wget $wget_timeout $1/$2 -O $3/$2
   elif [ "$protocol" == "ftp" ]; then
     if [ "$PASSIVE_FTP" == "1" ]; then
       wget_passive_ftp="--passive-ftp"
       ncftpget_passive_ftp="-F"
     fi 
     if [ "$FTP_TOOL" == "ncftpget" ]; then
-      (cd $3 && ncftpget $ncftpget_timeout $ncftpget_passive_ftp $1/$2)
+      ncftpget -c $ncftpget_timeout $ncftpget_passive_ftp $1/$2 > $3/$2
     elif [ "$FTP_TOOL" == "wget" ]; then
-      (cd $3 && wget $wget_timeout $wget_passive_ftp $1/$2)
+      wget $wget_timeout $wget_passive_ftp $1/$2 -O $3/$2
     else
       echo $BASENAME: error: invalid value for config variable FTP_TOOL: $FTP_TOOL
       echo $BASENAME: please check your config file $CONF
@@ -104,7 +104,15 @@ function simplaret_download {
     fi
   elif [ "$protocol" == "file" ]; then
     url="`echo $1 | sed -e 's/file:\/\///'`"
-    cp $url/$2 $3 2> /dev/null
+    if [ -f "$url/$2" ]; then
+      echo -n "Copying $url/$2..."
+      cp $url/$2 $3/$2 2> /dev/null
+      if [ "$?" == "0" ]; then
+        echo " done."
+      else
+        echo " failed."
+      fi
+    fi
   fi
 
 }