Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-15 21:48:43 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-15 21:48:43 +0300
commita810c5e518df4b368d202a0bae6fa147242d554f (patch)
tree21663a4bef5fdaf6ab3862ac7428234ce2e8bacd
parentaf456357192885db763217dcb030264173ef2af6 (diff)
library.sh: Make sure the directory exists before installing template
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
-rw-r--r--etc/library.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/library.sh b/etc/library.sh
index b7fc0354..098af18e 100644
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -211,6 +211,7 @@ install_template() {
local template="${1?}"
local target="${2?}"
local bkp="$(mktemp)"
+ mkdir -p "$(dirname "$target")"
[[ -f "$target" ]] && cp -a "$target" "$bkp"
{
if [[ "${3:-}" == "--defaults" ]]; then