freebsd-ports/sysutils/password-store/files/linuxism.patch
Steve Wills 1fb57dc568 - Update to 1.4.2
PR:		ports/172916
Submitted by:	milki <milki@rescomp.berkeley.edu> (maintainer)
Feature safe:	yes
2012-10-21 04:14:32 +00:00

40 lines
1.4 KiB
Diff

diff --git src/password-store.sh src/password-store.sh
index 26a4bd0..4e0526d 100755
--- src/password-store.sh
+++ src/password-store.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Copyright (C) 2012 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
@@ -108,20 +108,20 @@ clip() {
echo "Copied $2 to clipboard. Will clear in 45 seconds."
}
tmpdir() {
- if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
- tmp_dir="$(TMPDIR=/dev/shm mktemp -t "$template" -d)"
+ ramdisk="/var/tmp/password-store.ramdisk"
+ if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then
+ tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)"
else
- yesno "$(echo "Your system does not have /dev/shm, which means that it may"
- echo "be difficult to entirely erase the temporary non-encrypted"
- echo "password file after editing. Are you sure you would like to"
- echo -n "continue?")"
+ yesno "$(echo "A ramdisk does not exist at $ramdisk, which means that it may"
+ echo "be difficult to entirely erase the temporary non-encrypted"
+ echo "password file after editing. Are you sure you would like to"
+ echo -n "continue?")"
+
tmp_dir="$(mktemp -t "$template" -d)"
fi
-
}
-GETOPT="getopt"
-# source /path/to/platform-defined-functions
+GETOPT="/usr/local/bin/getopt"
#
# END Platform definable
#