aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/simplaret12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/simplaret b/src/simplaret
index bd50712..1c32166 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -436,8 +436,16 @@ function simplaret_get {
function simplaret_search_and_download_patch {
+ local package_version package_build
+
+ # get just the file name
candidate="`basename $(echo $candidate | cut -d , -f 1)`"
+ # now split the file name into pieces
+ package_version="`package_version $candidate`"
+ package_build="`package_build $candidate`"
+ candidate="`package_name $candidate`"
+
# check if the patch was already downloaded
if echo $DOWNLOADED_PATCHES | grep -q " $candidate "; then
return
@@ -448,7 +456,7 @@ function simplaret_search_and_download_patch {
if [ ! -z "$installed_packs" ]; then
for installed in $installed_packs; do
- if [[ "`package_name $candidate`" == "`package_name $installed.tgz`" ]]; then
+ if [[ "$candidate" == "`package_name $installed.tgz`" ]]; then
package_installed="1"
break
fi
@@ -458,7 +466,7 @@ function simplaret_search_and_download_patch {
if [[ "$package_installed" != "1" ]]; then
# TODO: verificar se eh a mesma versao e build number?
# DOWNLOAD_EVEN_IF_APPLIED?
- simplaret_get `package_name $candidate`
+ simplaret_get $candidate
DOWNLOADED_PATCHES="$DOWNLOADED_PATCHES $candidate " # the ending space is important
fi