summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/librefetch/librefetch12
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
}