mirror of
https://github.com/ryantm/agenix.git
synced 2024-12-22 15:48:30 +03:00
create leading directories if they don't exist
This works for files without directories too because `dirname` prints `.` in that case.
This commit is contained in:
parent
05591973d7
commit
65fe5959c3
1 changed files with 2 additions and 0 deletions
|
@ -181,6 +181,8 @@ function edit {
|
|||
|
||||
@ageBin@ "${ENCRYPT[@]}" <"$CLEARTEXT_FILE" || exit 1
|
||||
|
||||
mkdir -p "$(dirname "$FILE")"
|
||||
|
||||
mv -f "$REENCRYPTED_FILE" "$FILE"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue