diff options
Diffstat (limited to 'src/simplaret')
| -rwxr-xr-x | src/simplaret | 21 | 
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  | 
