diff options
author | Mike Gerwitz <mike.gerwitz@rtspecialty.com> | 2019-04-04 14:52:36 -0400 |
---|---|---|
committer | Mike Gerwitz <mike.gerwitz@rtspecialty.com> | 2019-04-04 14:52:36 -0400 |
commit | 6f5796238a2102b2fb05cc15422abcbe7bf228de (patch) | |
tree | 9836872308e799b1349ca0e7c00e2439e45789bf /bin | |
parent | 1a35232bd8c96a2938a11356184019971823f2c9 (diff) | |
download | tame-6f5796238a2102b2fb05cc15422abcbe7bf228de.tar.gz tame-6f5796238a2102b2fb05cc15422abcbe7bf228de.tar.bz2 tame-6f5796238a2102b2fb05cc15422abcbe7bf228de.zip |
tame: Create guard parent directory
It may not exist on certain systems (e.g. build containers).
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tame | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -299,6 +299,9 @@ start-tamed-safe() local -r root=${1?Missing root} local -ri timeout=5 + local -r guard="$root-guard" + + mkdir -p "$( dirname "$root" )" ( flock -w $timeout 6 || { @@ -309,8 +312,8 @@ start-tamed-safe() _start-tamed "$root" flock -u 6 - rm -f "$root-guard" - ) 6>"$root-guard" + rm -f "$guard" + ) 6>"$guard" } |