Skip to content

Commit

Permalink
Merge pull request #96 from rsmarples/devel
Browse files Browse the repository at this point in the history
POSIX shell does not require the local builtin
  • Loading branch information
Ryan Harris authored Jan 24, 2018
2 parents 03c89f2 + 2a50620 commit 1b05fb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keychain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1b05fb8

Please sign in to comment.