From 246a539d7c3987cfaca3739b94dfb4a6f3dbe6ab Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 10 Jan 2007 16:03:52 +0000 Subject: simplaret: --install checks if package file exist --get-patches now does a --update for each arch and version before get the patches git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@86 04377dda-e619-0410-9926-eae83683ac58 --- src/simplaret | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/simplaret b/src/simplaret index 8bf18ca..189d467 100755 --- a/src/simplaret +++ b/src/simplaret @@ -507,6 +507,8 @@ function simplaret_get_jail_patches { VERSION="`default_version`" ARCH="`default_arch`" + simplaret_update + # in case there's something wrong with the jail, abort if [ -z "$VERSION" ] || [ -z "$ARCH" ]; then return @@ -603,7 +605,11 @@ function simplaret_install { package="`simplaret_get $1 --silent`" if [ "$?" == "0" ]; then - $root upgradepkg --install-new $package + if [ -f "$package" ]; then + $root upgradepkg --install-new $package + else + echo "error: could not install package $package: file not found" + fi else echo "error: could not install package $package" exit 1 -- cgit v1.2.3