aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-01 01:43:28 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-01 01:43:28 +0000
commite6fd9b6006b6efd60a937c9302995fe4bd50c39a (patch)
treec30c520cfb4269857a5e08a6b123b7c067f55aed /src
parentacc9d00711a2030341b45120552df0095a67c257 (diff)
downloadsimplepkg-e6fd9b6006b6efd60a937c9302995fe4bd50c39a.tar.gz
simplepkg-e6fd9b6006b6efd60a937c9302995fe4bd50c39a.tar.bz2
small fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@150 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-xsrc/simplaret13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/simplaret b/src/simplaret
index 4b472b8..d9fd1c8 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -504,16 +504,18 @@ function simplaret_get {
simplaret_download $repository_url $file $folder
if [ ! -f "$folder/$candidate" ]; then
+ LAST_DONWLOADED_PACKAGE="0"
if [ "$2" != "--silent" ]; then
echo Error downloading $candidate from $repos_type repository $repository_url, please check your settings
fi
return 1
else
+ LAST_DONWLOADED_PACKAGE="$folder/$candidate"
if [ "$2" != "--silent" ]; then
silent=""
echo Package $candidate stored at $folder
else
- echo $folder/$candidate
+ # echo $folder/$candidate
silent="--silent"
fi
simplaret_checksum $storage/$repository_name/CHECKSUMS.md5 $folder/$candidate $silent
@@ -767,17 +769,22 @@ function simplaret_install {
fi
fi
- package="`simplaret_get $1 --silent`"
+ # package="`simplaret_get $1 --silent`"
+ simplaret_get $1 --silent
+ package="$LAST_DONWLOADED_PACKAGE"
- if [ "$?" == "0" ] && [ ! -z "$package" ]; then
+ if [ "$package" != "0" ] && [ ! -z "$package" ]; then
if [ -f "$package" ]; then
ROOT=$root upgradepkg --install-new $package
+ LAST_DONWLOADED_PACKAGE="0"
else
echo "error: could not install package $1: file not found"
+ LAST_DONWLOADED_PACKAGE="0"
return 1
fi
else
echo "error: could not install package $1"
+ LAST_DONWLOADED_PACKAGE="0"
return 1
fi