small fixes

This commit is contained in:
teldra 2022-07-12 17:03:50 +02:00
parent 57c3d5dcc9
commit a6519ecb64
2 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# define folder for content
PATH="content/posts"
CONTENT_PATH="content/posts"
# define an error function
err() {
@ -35,7 +35,7 @@ for file in "${files[@]}"; do
s="${s/#-}" # remove - from start
s="${s/%-}" # remove - from end
fname="${s,,}" # convert to lowercase
folder="${PATH}/${fname}"
folder="${CONTENT_PATH}/${fname}"
# check if file is compatible by checking if 'index.de.md' available
if ! unzip -l "${file}"|grep -q "index.de.md"; then
@ -43,7 +43,7 @@ for file in "${files[@]}"; do
fi
#check if folder '${PATH}' available
if ! [ -d "${PATH}" ]; then
if ! [ -d "${CONTENT_PATH}" ]; then
err "Folder 'content' not found."
fi
@ -70,7 +70,7 @@ for file in "${files[@]}"; do
s="${s/#-}" # remove - from start
s="${s/%-}" # remove - from end
fname="${s,,}" # convert to lowercase
folder="${PATH}/${fname}"
folder="${CONTENT_PATH}/${fname}"
# get a list of files in folder
for f in $(find "${folder}" -type f); do

View File

@ -60,4 +60,3 @@ pictureQuality = 50
[foundations]
lg_landschaftsverband = "https://www.lueneburgischer-landschaftsverband.de/"
rote_hilfe = "https://www.rote-hilfe.de/"