From: Jose V Beneyto Date: Fri, 15 Apr 2011 09:27:51 +0000 (+0200) Subject: pkgadd-cross: fixed problem when the script is invoked by prt-get-cross which failed... X-Git-Url: http://gitweb/?a=commitdiff_plain;h=dc630bcd723ff890e6b4c9be56f12ba6f98bc069;p=pkgutils-cross.git pkgadd-cross: fixed problem when the script is invoked by prt-get-cross which failed to pass the whole path for the package to install/update --- diff --git a/pkgadd-cross b/pkgadd-cross index 8d68c81..c3dd96e 100755 --- a/pkgadd-cross +++ b/pkgadd-cross @@ -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