diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2023-05-03 23:15:26 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2023-05-03 23:15:26 +0200 |
| commit | c82733b107497dbb9b454463c5860b8c8140ce27 (patch) | |
| tree | e1b1bf0ff22b3cd425af22846f7de198826ffcd3 /env.sh | |
| parent | 7be6950258767f2beb47bc44056850fd7bc12002 (diff) | |
.
Diffstat (limited to 'env.sh')
| -rw-r--r-- | env.sh | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +root_dir="$(cd "$(dirname -- "$0")"; pwd)" +build_dir="$root_dir/build" +aur_dir="$root_dir/aur" + +if [ $# -gt 0 ]; then + packages="$*" +else + packages="$(find "$root_dir" -mindepth 2 -maxdepth 2 -type f -name PKGBUILD | \ + xargs -I {} dirname {} | \ + xargs -I {} basename {})" +fi + +for package in $packages; do + if [ ! -f "$root_dir/$package/PKGBUILD" ]; then + echo "invalid package $package" 1>&2 + exit 1 + fi +done + +export PATH="/usr/bin:$PATH" + + +set_makepkg_envs() { + package=$1 + export PKGDEST="$build_dir/$package" + export SRCDEST="$build_dir/$package" + export SRCPKGDEST="$build_dir" + export LOGDEST="$build_dir" + export BUILDDIR="$build_dir" +} |
