Fix css processor not working without theme dir

Processor will now automatically create the necessary directory to put
the css stylesheet into if the directory does not exist yet,
instead of failing to apply the theme.
This commit is contained in:
Marty Oehme 2020-12-22 11:22:49 +01:00
parent 9d4e143bbe
commit 044f2e8a5c
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -54,8 +54,13 @@ save() {
fix_placeholders fix_placeholders
echo "$newsheet" >"$stylesheet" if [ ! -f "$stylesheet" ]; then
mkdir -p "$(dirname "$stylesheet")" || dbg_msg $app error "Could not create theme folder for $stylesheet"
dbg_msg $app "Theme folder for $stylesheet did not exist yet so I created it"
fi
echo "$newsheet" >"$stylesheet"
dbg_msg $app "Saved theme to $stylesheet"
} }
fix_placeholders() { fix_placeholders() {