diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-01-01 01:11:08 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-01-01 01:11:08 +1300 |
commit | e19bb8fb3c8350bee288327abd978a59eb3dc0f7 (patch) | |
tree | 754d2d883b27477f53f0fece44ef9edc7e4238f0 /bin/gms.sh | |
parent | Merge branch 'release/v4.2.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-4.3.0.tar.gz (sig) dotfiles-4.3.0.zip |
Merge branch 'release/v4.3.0'v4.3.0
* release/v4.3.0:
Bump VERSION
Switch to using GNU Emacs on development machines
Trim some trailing whitespace
Clarify control flow in shell scripts
Add clarifying comment
Translate a short-circuit into a conditional
Add a cheeky error message to sd()
Strip trailing slashes from sd() target
Correct error message from sd()
Diffstat (limited to 'bin/gms.sh')
-rw-r--r-- | bin/gms.sh | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3,7 +3,9 @@ # Trap to remove whatever's set in lockdir if we're killed lockdir= cleanup() { - [ -n "$lockdir" ] && rm -fr -- "$lockdir" + if [ -n "$lockdir" ] ; then + rm -fr -- "$lockdir" + fi if [ "$1" != EXIT ] ; then trap - "$1" kill "-$1" "$$" @@ -23,7 +25,8 @@ for rcfile in "${GETMAIL:-"$HOME"/.getmail}"/getmailrc.* ; do ( lockdir=${TMPDIR:-/tmp}/getmail.$uid.${rcfile##*/}.lock mkdir -m 0700 -- "$lockdir" 2>/dev/null || exit try -n 3 -s 15 getmail --rcfile "$rcfile" "$@" - rm -fr -- "$lockdir" && lockdir= + rm -fr -- "$lockdir" + lockdir= ) & done # Wait for all of the enqueued tasks to finish |