]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
simplaret:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 10 Jan 2007 16:03:52 +0000 (16:03 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 10 Jan 2007 16:03:52 +0000 (16:03 +0000)
  --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

index 8bf18ca7b94c2ddb253fa7d67ca32c0ca0883e55..189d467f7c64a58baaae6ace1538ecf3320667b2 100755 (executable)
@@ -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