diff options
Diffstat (limited to 'src/simplaret')
-rwxr-xr-x | src/simplaret | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/simplaret b/src/simplaret index 7db9dbf..1c0938b 100755 --- a/src/simplaret +++ b/src/simplaret @@ -390,17 +390,18 @@ function simplaret_search_and_delete { if [ "`package_name $candidate`" == "$1" ]; then # check if has the same version and build number, otherwise erase the old one for result in `simplaret_search $(package_name $candidate) --basename-only`; do - if [ "`package_name $candidate`" == "`package_name $result`" ] && \ - [ "`package_version $candidate`" == "`package_version $result`" ] && \ - [ "`package_build $candidate`" == "`package_build $result`" ]; then - if [ "$3" != "--silent" ]; then - echo package $candidate already downloaded and stored at `dirname $file` - else echo $file - fi - return 1 - else - rm $file - break + if [ "`package_name $candidate`" == "`package_name $result`" ]; then + if [ "`package_version $candidate`" == "`package_version $result`" ] && \ + [ "`package_build $candidate`" == "`package_build $result`" ]; then + if [ "$3" != "--silent" ]; then + echo package $candidate already downloaded and stored at `dirname $file` + else echo $file + fi + return 1 + else + rm $file + break + fi fi done fi |