#!/bin/bash
+PKGMK_CONF=/devel/crux-arm/pkgutils-cross/src/pkgmk.conf
+. $PKGMK_CONF
+
[ ! -f getBuildOrder.sh ] && exit 1
for port in $(sh 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 $(find . -type f -name '*.pkg.tar.gz') || sudo pkgadd-cross -f $(find . -type f -name '*.pkg.tar.gz') ) || 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
cd - || exit 1
done