small fixes
This commit is contained in:
parent
57c3d5dcc9
commit
a6519ecb64
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# define folder for content
|
# define folder for content
|
||||||
PATH="content/posts"
|
CONTENT_PATH="content/posts"
|
||||||
|
|
||||||
# define an error function
|
# define an error function
|
||||||
err() {
|
err() {
|
||||||
|
@ -35,7 +35,7 @@ for file in "${files[@]}"; do
|
||||||
s="${s/#-}" # remove - from start
|
s="${s/#-}" # remove - from start
|
||||||
s="${s/%-}" # remove - from end
|
s="${s/%-}" # remove - from end
|
||||||
fname="${s,,}" # convert to lowercase
|
fname="${s,,}" # convert to lowercase
|
||||||
folder="${PATH}/${fname}"
|
folder="${CONTENT_PATH}/${fname}"
|
||||||
|
|
||||||
# check if file is compatible by checking if 'index.de.md' available
|
# check if file is compatible by checking if 'index.de.md' available
|
||||||
if ! unzip -l "${file}"|grep -q "index.de.md"; then
|
if ! unzip -l "${file}"|grep -q "index.de.md"; then
|
||||||
|
@ -43,7 +43,7 @@ for file in "${files[@]}"; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#check if folder '${PATH}' available
|
#check if folder '${PATH}' available
|
||||||
if ! [ -d "${PATH}" ]; then
|
if ! [ -d "${CONTENT_PATH}" ]; then
|
||||||
err "Folder 'content' not found."
|
err "Folder 'content' not found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ for file in "${files[@]}"; do
|
||||||
s="${s/#-}" # remove - from start
|
s="${s/#-}" # remove - from start
|
||||||
s="${s/%-}" # remove - from end
|
s="${s/%-}" # remove - from end
|
||||||
fname="${s,,}" # convert to lowercase
|
fname="${s,,}" # convert to lowercase
|
||||||
folder="${PATH}/${fname}"
|
folder="${CONTENT_PATH}/${fname}"
|
||||||
|
|
||||||
# get a list of files in folder
|
# get a list of files in folder
|
||||||
for f in $(find "${folder}" -type f); do
|
for f in $(find "${folder}" -type f); do
|
||||||
|
|
|
@ -60,4 +60,3 @@ pictureQuality = 50
|
||||||
|
|
||||||
[foundations]
|
[foundations]
|
||||||
lg_landschaftsverband = "https://www.lueneburgischer-landschaftsverband.de/"
|
lg_landschaftsverband = "https://www.lueneburgischer-landschaftsverband.de/"
|
||||||
rote_hilfe = "https://www.rote-hilfe.de/"
|
|
||||||
|
|
Loading…
Reference in New Issue