blob: 199742a14137b81accd2c1a938862c2c234d6e68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Copyright (C) 2012 Jonathan Chu <milki@rescomp.berkeley.edu>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
tmpdir() {
local 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 "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="/usr/local/bin/getopt"
SHRED="rm -P -f"
|