aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-01-12 20:22:20 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-01-12 20:22:20 +0000
commitd301efd14beb64a10095f74a48833b288492030a (patch)
tree6190e1f23888255a457ae10f2d2b993394c92bcb /src
parent779cce0a9ad01557ea3af7fc703de1cb4eaddc0b (diff)
downloadsimplepkg-d301efd14beb64a10095f74a48833b288492030a.tar.gz
simplepkg-d301efd14beb64a10095f74a48833b288492030a.tar.bz2
simplaret: simplaret_search_and_delete logic fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@103 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-xsrc/simplaret23
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