From 2a5062016f5a2a1fcfe836a7c71c3ebc2398c97e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 20 Jan 2018 21:38:43 +0000 Subject: [PATCH] POSIX shell does not require the local builtin And sadly some ksh variants don't support it. As keychain hardly uses it, just stop using it. --- keychain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keychain.sh b/keychain.sh index 20e3368..f9465b3 100755 --- a/keychain.sh +++ b/keychain.sh @@ -176,7 +176,7 @@ lockfile() { # it returns 0. If it fails, it returns 1. This function retuns immediately # and only tries to acquire the lock once. - local tmpfile="$lockf.$$" + tmpfile="$lockf.$$" echo $$ >"$tmpfile" 2>/dev/null || exit if ln "$tmpfile" "$lockf" 2>/dev/null; then @@ -205,7 +205,7 @@ takelock() { # First attempt: lockfile && return 0 - local counter=0 + counter=0 mesg "Waiting $lockwait seconds for lock..." while [ "$counter" -lt "$(( $lockwait * 2 ))" ] do