diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-15 15:53:29 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-15 15:55:33 +0200 |
commit | 9814164829ce169fef152ee43d89ca48d0b8adb8 (patch) | |
tree | 7b8fc139b4d4cdf4087145a45deb42c75124ab27 /src/platform | |
parent | 8eb133b6d242875857f9e88302534274d71ae662 (diff) |
Reorganize entire program
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/platform')
-rw-r--r-- | src/platform/darwin.sh | 8 | ||||
-rw-r--r-- | src/platform/freebsd.sh | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh index bbedfd5..8f39ee9 100644 --- a/src/platform/darwin.sh +++ b/src/platform/darwin.sh @@ -2,13 +2,13 @@ # This file is licensed under the GPLv2+. Please see COPYING for more information. clip() { - sleep_argv0="password store sleep for user $(id -u)" + local sleep_argv0="password store sleep for user $(id -u)" pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5 - before="$(pbpaste | openssl base64)" + local before="$(pbpaste | openssl base64)" echo -n "$1" | pbcopy ( ( exec -a "$sleep_argv0" sleep "$CLIP_TIME" ) - now="$(pbpaste | openssl base64)" + local now="$(pbpaste | openssl base64)" [[ $now != $(echo -n "$1" | openssl base64) ]] && before="$now" echo "$before" | openssl base64 -d | pbcopy ) 2>/dev/null & disown @@ -25,7 +25,7 @@ tmpdir() { } trap cleanup_tmp INT TERM EXIT tmp_dir="$(mktemp -t "$template" -d)" - ramdisk_dev="$(hdid -drivekey system-image=yes -nomount 'ram://32768' | cut -d ' ' -f 1)" # 32768 sectors = 16 mb + local ramdisk_dev="$(hdid -drivekey system-image=yes -nomount 'ram://32768' | cut -d ' ' -f 1)" # 32768 sectors = 16 mb [[ -z $ramdisk_dev ]] && exit 1 newfs_hfs -M 700 "$ramdisk_dev" &>/dev/null || exit 1 mount -t hfs -o noatime -o nobrowse "$ramdisk_dev" "$tmp_dir" || exit 1 diff --git a/src/platform/freebsd.sh b/src/platform/freebsd.sh index b3a4136..199742a 100644 --- a/src/platform/freebsd.sh +++ b/src/platform/freebsd.sh @@ -2,7 +2,7 @@ # This file is licensed under the GPLv2+. Please see COPYING for more information. tmpdir() { - ramdisk="/var/tmp/password-store.ramdisk" + local ramdisk="/var/tmp/password-store.ramdisk" if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)" else |