aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-12-10 23:06:01 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-12-10 23:06:01 +0000
commitc1b2b78d055175ed9ffae29669ed001ddc2a1e8a (patch)
tree1390f4cca45435ddb84769e00e84b2d0b112bc54 /lib
parent7a5f5b49aaa035fec6fba47030f48cebda934856 (diff)
downloadsimplepkg-c1b2b78d055175ed9ffae29669ed001ddc2a1e8a.tar.gz
simplepkg-c1b2b78d055175ed9ffae29669ed001ddc2a1e8a.tar.bz2
common.sh: install_packages fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@70 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/common.sh b/lib/common.sh
index ed00779..5da1ed7 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -132,12 +132,25 @@ function install_packages {
# if the package wasnt found, try to donwload it
if [[ "$package_downloaded" != "1" ]]; then
ARCH=$ARCH VERSION=$VERSION $SIMPLARET --get $pack -a
- for file in `find $STORAGE/$extrafolder -name $pack*tgz`; do
+
+ # it can be stored at the patches folder
+ for file in `find $PATCHES_DIR/$extrafolder -name $pack*tgz`; do
if [[ "`package_name $file`" == "$pack" ]]; then
package_file="$file"
break
fi
done
+
+ # or it can be stored at the standard packages folder
+ if [ -z "$package_file" ]; then
+ for file in `find $STORAGE/$extrafolder -name $pack*tgz`; do
+ if [[ "`package_name $file`" == "$pack" ]]; then
+ package_file="$file"
+ break
+ fi
+ done
+ fi
+
fi
# now tries to install the package, if available