aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/CHANGELOG2
-rwxr-xr-xsimplepkg.SlackBuild2
-rwxr-xr-xsrc/simplaret11
3 files changed, 8 insertions, 7 deletions
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index ed29408..9f53214 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -1,7 +1,7 @@
simplepkg changelog
-------------------
-0.4.9pre10-14: simplaret small fixes
+0.4.9pre10-15: lots of simplaret fixes
0.4.9pre9: createpkg:
- speedup
diff --git a/simplepkg.SlackBuild b/simplepkg.SlackBuild
index 5647bb8..fd9cf86 100755
--- a/simplepkg.SlackBuild
+++ b/simplepkg.SlackBuild
@@ -6,7 +6,7 @@
PACKAGE="simplepkg"
PACK_DIR="package-$PACKAGE"
BUILD=${BUILD:=1rha}
-VERSION="0.4.9pre14"
+VERSION="0.4.9pre15"
ARCH="noarch"
LIBEXEC="/usr/libexec/$PACKAGE"
BINDIR="/usr/bin"
diff --git a/src/simplaret b/src/simplaret
index b58e41b..075cd7c 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -71,11 +71,12 @@ function simplaret_download {
# download a file from a repo to a folder
# usage: simplaret <repository_url> <package> <destination-folder>
- local protocol
+ local protocol file
local wget_timeout wget_passive_ftp
local ncftpget_timeout ncftpget_passive_ftp
protocol="`echo $1 | cut -d : -f 1`"
+ file="`basename $2`"
if [ ! -d "$3" ]; then
mkdir -p $3
@@ -87,16 +88,16 @@ function simplaret_download {
fi
if [ "$protocol" == "http" ]; then
- wget $wget_timeout $1/$2 -O $3/$2
+ wget $wget_timeout $1/$2 -O $3/$file
elif [ "$protocol" == "ftp" ]; then
if [ "$PASSIVE_FTP" == "1" ]; then
wget_passive_ftp="--passive-ftp"
ncftpget_passive_ftp="-F"
fi
if [ "$FTP_TOOL" == "ncftpget" ]; then
- ncftpget -c $ncftpget_timeout $ncftpget_passive_ftp $1/$2 > $3/$2
+ ncftpget -c $ncftpget_timeout $ncftpget_passive_ftp $1/$2 > $3/$file
elif [ "$FTP_TOOL" == "wget" ]; then
- wget $wget_timeout $wget_passive_ftp $1/$2 -O $3/$2
+ wget $wget_timeout $wget_passive_ftp $1/$2 -O $3/$file
else
echo $BASENAME: error: invalid value for config variable FTP_TOOL: $FTP_TOOL
echo $BASENAME: please check your config file $CONF
@@ -106,7 +107,7 @@ function simplaret_download {
url="`echo $1 | sed -e 's/file:\/\///'`"
if [ -f "$url/$2" ]; then
echo -n "Copying $url/$2..."
- cp $url/$2 $3/$2 2> /dev/null
+ cp $url/$2 $3/$file 2> /dev/null
if [ "$?" == "0" ]; then
echo " done."
else