diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-09 00:21:35 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-09 00:21:35 -0600 |
commit | abc170f4dbe938c349ace065a7b8cc7b973a825a (patch) | |
tree | 8fee9ec72080a3f66317ca20eb5b431e8f3e337e | |
parent | b9f66ea01e048acd460f238212b4c38d6f704b5c (diff) |
librefetch: re-think BUILDDIR logic.
-rwxr-xr-x | src/librefetch/librefetch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 0bc5400..368bfb4 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -79,10 +79,9 @@ main() { ######################################################################## - local startdir=$PWD - export BUILDDIR="${BUILDFILE%/*}" - if [[ -f "${BUILDDIR}/SRCBUILD" ]]; then - BUILDFILE="${BUILDDIR}/SRCBUILD" + local BUILDFILEDIR="${BUILDFILE%/*}" + if [[ -f "${BUILDFILEDIR}/SRCBUILD" ]]; then + BUILDFILE="${BUILDFILEDIR}/SRCBUILD" srcbuild="$(modified_srcbuild "$BUILDFILE")" else srcbuild="$(modified_pkgbuild "$BUILDFILE")" @@ -134,9 +133,10 @@ main() { if [[ $mode =~ create ]]; then PKGEXT=${dst##*/} export PKGEXT=${PKGEXT%.part} - export PKGDEST=$startdir + export PKGDEST=${dst%/*} export pkg_file=$dst - cd "$BUILDDIR" + + cd "$BUILDFILEDIR" "$makepkg" "${makepkg_opts[@]}" -p "$srcbuild" >> /dev/stderr || return 1 fi } |