summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/librefetch/librefetch7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index e3897c7..e2300e0 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -323,8 +323,7 @@ tidy_install_purge() {
modified_makepkg() {
local makepkg_orig=$1
- local makepkg_mine="$tempdir/makepkg"
- local makepkg_mine="$(mktemp "${0##*/}.XXXXXXXXXXX.makepkg")"
+ local makepkg_mine="$(mktemp --tmpdir "${0##*/}.XXXXXXXXXXX.makepkg")"
tmpfiles+=("$makepkg_mine")
{
echo '#!/bin/bash'
@@ -378,7 +377,7 @@ package() { cp -a "$srcdir"/*/ "$pkgdir/"; }
modified_pkgbuild() {
local pkgbuild=$1
- local srcbuild="$(mktemp "${0##*/}.XXXXXXXXXXX.PKGBUILD.2.SRCBUILD")"
+ local srcbuild="$(mktemp "${pkgbuild%/*}/${0##*/}.XXXXXXXXXXX.PKGBUILD.2.SRCBUILD")"
tmpfiles+=("$srcbuild")
printf '%s' "$pkgbuild_append" | cat "$pkgbuild" - > "$srcbuild"
printf '%s\n' "$srcbuild"
@@ -389,7 +388,7 @@ modified_pkgbuild() {
modified_srcbuild() {
local orig=$1
- local srcbuild="$(mktemp "${0##*/}.XXXXXXXXXXX.SRCBUILD.2.SRCBUILD")"
+ local srcbuild="$(mktemp "${orig%/*}/${0##*/}.XXXXXXXXXXX.SRCBUILD.2.SRCBUILD")"
tmpfiles+=("$srcbuild")
sed -e '/PKGDEST=/d' -e '/PKGEXT=/d' < "$orig" > "$new"
printf '%s\n' "$new"