CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkgadd-cross: fixed problem when the script is invoked by prt-get-cross which failed...
authorJose V Beneyto <sepen@crux.nu>
Fri, 15 Apr 2011 09:27:51 +0000 (11:27 +0200)
committerJose V Beneyto <sepen@crux.nu>
Fri, 15 Apr 2011 09:27:51 +0000 (11:27 +0200)
pkgadd-cross

index 8d68c81648a2cf644936046333224b0eaaec038a..c3dd96e47ae3906c31752a0cb5fd3a09ad5c1f7e 100755 (executable)
@@ -18,6 +18,25 @@ if [ ! -f $CLFS/var/lib/pkg/db ]; then
   touch $CLFS/var/lib/pkg/db
 fi
 
-$PKGADD -c $PKGADD_CONF -r $CLFS $@
+# be sure that the path to package file exists
+# and if not prepend the package dir variable
+ARGS=""
+while [ "$1" ]; do
+  case $1 in
+    *.pkg.tar.*)
+      PATH_TO_PACKAGE="$1"
+      if [ ! -f "$PATH_TO_PACKAGE" ]; then
+        PATH_TO_PACKAGE="$PKGMK_PACKAGE_DIR/$PATH_TO_PACKAGE"
+      fi
+      ARGS="$ARGS $PATH_TO_PACKAGE"
+      ;;
+    *)
+      ARGS="$ARGS $1"
+      ;;
+  esac
+  shift
+done
+
+$PKGADD -c $PKGADD_CONF -r $CLFS $ARGS
 
 # End of file