1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

Replace mktemp's --tmpdir option with shell code.

bacman and updpkgsums used GNU mktemp's --tmpdir option, which is not
supported by some other implementations (including busybox). Replace that with
shell code.

Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Alastair Hughes 2015-12-31 13:10:21 +13:00 committed by Allan McRae
parent 774c7eb24d
commit 6aee32102f
2 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ fi
# Begin
#
msg "Package: ${pkg_namver}"
work_dir=$(mktemp -d --tmpdir bacman.XXXXXXXXXX)
work_dir=$(mktemp -d "${TMPDIR:-/tmp}/bacman.XXXXXXXXXX")
cd "$work_dir" || exit 1
#

View File

@ -79,8 +79,8 @@ if [[ ! -w . ]]; then
fi
# Generate the new sums
export BUILDDIR=$(mktemp -d --tmpdir updpkgsums.XXXXXX)
newbuildfile=$(mktemp --tmpdir updpkgsums.XXXXXX)
export BUILDDIR=$(mktemp -d "${TMPDIR:-/tmp}/updpkgsums.XXXXXX")
newbuildfile=$(mktemp "${TMPDIR:-/tmp}/updpkgsums.XXXXXX")
trap "rm -rf '$BUILDDIR' '$newbuildfile'" EXIT
newsums=$(makepkg -g -p "$buildfile") || die 'Failed to generate new checksums'