From 6d1e8df5932a5968e81d990b75cbfb9e16f45d9a Mon Sep 17 00:00:00 2001 From: Jose V Beneyto Date: Fri, 6 May 2011 13:35:49 +0200 Subject: [PATCH] Fixed buildAllPackages.sh to use PKGMK_PACKAGE_DIR even if this variable is empty, and fixed issues related to environment variable PATH --- buildAllPackages.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/buildAllPackages.sh b/buildAllPackages.sh index e7580a9..5dd90e2 100755 --- a/buildAllPackages.sh +++ b/buildAllPackages.sh @@ -1,21 +1,25 @@ #!/bin/bash -PKGMK_CONF=/devel/crux-arm/pkgutils-cross/src/pkgmk.conf +PKGUTILS_PATH=/devel/crux-arm/pkgutils-cross +export PATH=$PATH:$PKGUTILS_PATH + +PKGMK_CONF=$PKGUTILS_PATH/src/pkgmk.conf . $PKGMK_CONF -[ ! -f getBuildOrder.sh ] && exit 1 -for port in $(sh getBuildOrder.sh); do +for port in $(getBuildOrder.sh); do # if package is previously installed [ ! -z "$(pkginfo-cross -i | grep "$port ")" ] && continue [ ! -f "${port}/Pkgfile" ] && exit 1 . $port/Pkgfile - [ -f "$port/${name}#${version}-${release}.pkg.tar.gz" ] && continue cd $port || exit 1 ( fakeroot pkgmk-cross -d 2>&1 | tee pkgmk.log ) || exit 1 - ( sudo pkgadd-cross $PKGMK_PACKAGE_DIR/${name}#${version}-${release}.pkg.tar.gz \ - || sudo pkgadd-cross -f $PKGMK_PACKAGE_DIR/${name}#${version}-${release}.pkg.tar.gz - ) || exit 1 + if [ ! -z "$PKGMK_PACKAGE_DIR" ]; then + PACKAGE="$PKGMK_PACKAGE_DIR/${name}#${version}-${release}.pkg.tar.gz" + else + PACKAGE="${name}#${version}-${release}.pkg.tar.gz" + fi + ( sudo pkgadd-cross $PACKAGE || sudo pkgadd-cross -f $PACKAGE ) || exit 1 cd - || exit 1 done -- 2.26.2