2023-05-02 14:06:10 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-05-09 13:35:35 +02:00
|
|
|
# Prüfen, ob wir im data-Verzeichnis sind
|
|
|
|
if [[ $(basename "$PWD") != "data" ]]; then
|
|
|
|
echo "Fehler: Bitte wechseln Sie in das 'data'-Verzeichnis"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Prüfen, ob der HTML-Ordner im übergeordneten Verzeichnis existiert
|
|
|
|
if [[ ! -d "../html" ]]; then
|
|
|
|
echo "Fehler: Das Verzeichnis '../html' existiert nicht"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Creating html files..."
|
2023-05-03 14:05:04 +02:00
|
|
|
bash ../../tools/html2string.sh ../html/index_template_top.html > index_template_top.html
|
|
|
|
bash ../../tools/html2string.sh ../html/index_template_middle.html > index_template_middle.html
|
|
|
|
bash ../../tools/html2string.sh ../html/index_template_bottom.html > index_template_bottom.html
|
|
|
|
bash ../../tools/html2string.sh ../html/config_template.html > config_template.html
|
|
|
|
bash ../../tools/html2string.sh ../html/light_control_template.html > light_control_template.html
|
2023-05-05 08:21:09 +02:00
|
|
|
bash ../../tools/html2string.sh ../html/top.js > top.js
|
|
|
|
bash ../../tools/html2string.sh ../html/bottom.js > bottom.js
|
2023-05-22 15:49:30 +02:00
|
|
|
bash ../../tools/html2string.sh ../html/style.css > style.css
|
2023-05-09 13:35:35 +02:00
|
|
|
|
2023-05-22 16:20:38 +02:00
|
|
|
#for file in *"_tmp"; do
|
|
|
|
# if [[ -f "$file" ]]; then
|
|
|
|
# new_file="${file%_tmp}"
|
|
|
|
# html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true "$file" > "$new_file"
|
|
|
|
# rm "$file"
|
|
|
|
# fi
|
|
|
|
#done
|
|
|
|
|