From a97dbb50966ae76345c7afba88acb3c061957667 Mon Sep 17 00:00:00 2001 From: rhatto Date: Sun, 10 Dec 2006 22:44:26 +0000 Subject: simplaret: simplaret_search_and_download_patch one more fix git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@68 04377dda-e619-0410-9926-eae83683ac58 --- src/simplaret | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3