Skip to content
Snippets Groups Projects
abuild.in 24 KiB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
		'f') force=1;;
		'h') usage;;
		'i') install_after="$install_after $OPTARG";;
		'n') die "Use newapkbuild to create new aports";;
Natanael Copa's avatar
Natanael Copa committed
		'q') quiet=1;;
		'r') install_deps=1;;
		'R') recursive=1;;
Natanael Copa's avatar
Natanael Copa committed
	esac
done
shift $(( $OPTIND - 1 ))

# If REPODEST is set then it will override the PKGDEST
if [ -n "$REPODEST" ]; then
	PKGDEST="$REPODEST/$repo"
fi

# source the buildfile
[ -f "$APKBUILD" ] || die "Could not find $APKBUILD (PWD=$PWD)"
. "$APKBUILD"
# If we are handling a sub package then reset subpackages and install
if [ -n "$subpkgname" ]; then
	origsubpackages="$subpackages"
pkgdir="$pkgbasedir/$pkgname"
controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
Natanael Copa's avatar
Natanael Copa committed

trap 'die "Aborted by user"' INT
Linux User's avatar
Linux User committed
set_xterm_title "abuild: $pkgname"
Natanael Copa's avatar
Natanael Copa committed

if [ -z "$1" ]; then
Natanael Copa's avatar
Natanael Copa committed
fi

while [ $# -gt 0 ]; do
	runpart $1
	shift
done

for i in $install_after; do
Natanael Copa's avatar
Natanael Copa committed
	post_add $i
Linux User's avatar
Linux User committed
cleanup
Natanael Copa's avatar
Natanael Copa committed