aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-01 00:05:20 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-01 00:05:20 +0000
commit08f6375bf7e7257ab32afdb48a81b26fbc225ed7 (patch)
tree2381723299737a87307e55b131d2e4f797f5981c /src
parent3b33885ba2dc5576f305557b0270ba7574257594 (diff)
downloadsimplepkg-08f6375bf7e7257ab32afdb48a81b26fbc225ed7.tar.gz
simplepkg-08f6375bf7e7257ab32afdb48a81b26fbc225ed7.tar.bz2
verbose enhancements
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@143 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-xsrc/simplaret21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/simplaret b/src/simplaret
index f2d2ebd..01dad09 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -38,7 +38,6 @@ function simplaret_usage {
function simplaret_get_index {
for file in `simplaret_metafiles`; do
- echo getting $1/$file:
simplaret_download $1 $file $2 --no-verbose
done
@@ -95,7 +94,9 @@ function simplaret_download {
curl_verbose="-#"
fi
+
if [ "$protocol" == "http" ]; then
+ echo Getting $1/$file:
if [ "$HTTP_TOOL" == "wget" ]; then
wget $wget_timeout $wget_verbose $1/$2 -O $3/$file
elif [ "$HTTP_TOOL" == "curl" ]; then
@@ -106,6 +107,7 @@ function simplaret_download {
exit 1
fi
elif [ "$protocol" == "ftp" ]; then
+ echo Getting $1/$file:
if [ "$PASSIVE_FTP" == "1" ]; then
wget_passive_ftp="--passive-ftp"
ncftpget_passive_ftp="-F"
@@ -124,14 +126,17 @@ function simplaret_download {
fi
elif [ "$protocol" == "file" ]; then
url="`echo $1 | sed -e 's/file:\/\///'`"
+ if [ -f "$3/$file" ]; then
+ rm -f $3/$file
+ fi
+ echo -n "Copying $url/$2..."
if [ -f "$url/$2" ]; then
- echo -n "Copying $url/$2..."
cp $url/$2 $3/$file 2> /dev/null
- if [ "$?" == "0" ]; then
- echo " done."
- else
- echo " failed."
- fi
+ fi
+ if [ -f "$3/$file" ]; then
+ echo " done."
+ else
+ echo " failed."
fi
fi
@@ -425,7 +430,7 @@ function simplaret_search_and_delete {
[ "`package_build $candidate`" == "`package_build $result`" ]; then
if [ "$3" != "--silent" ]; then
echo package $candidate already downloaded
- echo package $candidate stored at `dirname $file`
+ # echo package $candidate stored at `dirname $file`
else echo $file
fi
return 1