diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-06-30 14:47:09 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-06-30 14:47:09 +0200 |
commit | 4e6a49ebff535fdf5a07890af661ba7a2be6588a (patch) | |
tree | 656890d57e76992f6c73829a8aa375d4218857f7 /src/platform/darwin.sh | |
parent | 78a56a4d7b7d74ded10436f9d1e972cc47807cab (diff) | |
download | pass-4e6a49ebff535fdf5a07890af661ba7a2be6588a.tar.gz pass-4e6a49ebff535fdf5a07890af661ba7a2be6588a.tar.bz2 pass-4e6a49ebff535fdf5a07890af661ba7a2be6588a.zip |
darwin: allow for gnu mktemp in path
Diffstat (limited to '')
-rw-r--r-- | src/platform/darwin.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh index 9cc773d..d0aba47 100644 --- a/src/platform/darwin.sh +++ b/src/platform/darwin.sh @@ -24,7 +24,7 @@ tmpdir() { rm -rf "$SECURE_TMPDIR" } trap unmount_tmpdir INT TERM EXIT - SECURE_TMPDIR="$(mktemp -d -t "$PROGRAM")" + SECURE_TMPDIR="$(mktemp -d "${TMPDIR:-/tmp}/$PROGRAM.XXXXXXXXXXXXX")" DARWIN_RAMDISK_DEV="$(hdid -drivekey system-image=yes -nomount 'ram://32768' | cut -d ' ' -f 1)" # 32768 sectors = 16 mb [[ -z $DARWIN_RAMDISK_DEV ]] && die "Error: could not create ramdisk." newfs_hfs -M 700 "$DARWIN_RAMDISK_DEV" &>/dev/null || die "Error: could not create filesystem on ramdisk." |