From 2cc568ce2ec38979dde494cd1afd73eeb3673a77 Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Sun, 15 Jan 2012 18:30:23 -0500 Subject: Fix hard-coded directories in makepkgbuild. --- bin/makepkgbuild | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/makepkgbuild b/bin/makepkgbuild index 846e3e8..7f9d4bd 100755 --- a/bin/makepkgbuild +++ b/bin/makepkgbuild @@ -43,20 +43,20 @@ END [ -r PKGMETA ] || die 1 "PKGMETA could not be read." -tdir=~/.genpkg/lib/templ -[ -d "$tdir" ] || die 1 "template dir ($tdir) not found." +[ "$TDIR" ] || die 1 "TDIR env. var is unset." +[ -d "$TDIR" ] || die 1 "template dir ($TDIR) not found." tcmd=$(awk 'BEGIN { FS="\n"; RS="" } $1 == "template" { print $2 }' PKGMETA) [ "$tcmd" ] || die 1 "PKGMETA is missing 'template' entry." set -- $tcmd -cmd="$tdir/$1" +cmd="$TDIR/$1" [ -f "$cmd" -a -x "$cmd" ] \ - || die 2 "template command ($1) not in template dir ($tdir)" + || die 2 "template command ($1) not in template dir ($TDIR)" # Generate the PKGBUILD using basic pbfields script plus custom template. -"$tdir/pbfields" < PKGMETA > PKGBUILD || die 1 "pbfields returned error ${?}." -"$tdir"/$tcmd < PKGMETA >> PKGBUILD || die 1 "template pipeline ($tcmd) failed" +"$TDIR/pbfields" < PKGMETA > PKGBUILD || die 1 "pbfields returned error ${?}." +"$TDIR"/$tcmd < PKGMETA >> PKGBUILD || die 1 "template pipeline ($tcmd) failed" # Prepand/append text to the package, check, or build functions. for func in package check build -- cgit v1.2.3-24-g4f1b