diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-06 02:53:18 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-06 03:14:35 -0500 |
commit | 997d54d425c69fd1f816340eab46a0b72338cc15 (patch) | |
tree | 9fc9116a9cbc25fd38c3448d8c787341c1f91f38 /lib | |
parent | a181e77c492f7cbd454634c6d65151d6bb13ae25 (diff) | |
download | devtools32-997d54d425c69fd1f816340eab46a0b72338cc15.tar.xz |
lib/common.sh: lock, slock: Create directories for locks if necessary.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/common.sh b/lib/common.sh index 70752ff..d2a244f 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -140,6 +140,7 @@ get_full_version() { lock() { # Only reopen the FD if it wasn't handed to us if ! [[ "/dev/fd/$1" -ef "$2" ]]; then + mkdir -p "${2%/*}" eval "exec $1>"'"$2"' fi @@ -156,6 +157,7 @@ lock() { slock() { # Only reopen the FD if it wasn't handed to us if ! [[ "/dev/fd/$1" -ef "$2" ]]; then + mkdir -p "${2%/*}" eval "exec $1>"'"$2"' fi |