From ab5347aad49baad5eb058aea94cb8a8f118603f4 Mon Sep 17 00:00:00 2001 From: Juho Ervasti Date: Mon, 27 May 2024 13:45:04 +0300 Subject: [PATCH] Fix update_assets.sh script --- update_assets.sh | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/update_assets.sh b/update_assets.sh index 648c6a24..330d2752 100755 --- a/update_assets.sh +++ b/update_assets.sh @@ -3,30 +3,17 @@ src_folder="src" find "$src_folder" -type d -name "G*" -print0 | while IFS= read -r -d '' folder; do - cp assets/css -r $folder - cp assets/js -r $folder - cp assets/custom.css $folder + cp template/css -r $folder + cp template/js -r $folder + cp template/custom.css $folder - cp assets/custom.html $folder + cp template/custom.html $folder + # Translate company type to either English or Swedish + # if course is marked as '_en' or '_sv' if [[ "$folder" == *eng* ]]; then sed -i 's/Oy\./Ltd\./g' "$folder/custom.html" elif [[ "$folder" == *sv* ]]; then sed -i 's/Oy\./AB/g' "$folder/custom.html" fi done - -docs_folder="docs" - -find "$docs_folder" -type d -name "G*" -print0 | while IFS= read -r -d '' folder; do - cp assets/css -r $folder - cp assets/js -r $folder - cp assets/custom.css $folder -done - -template_folder="template" - -cp assets/css -r $template_folder -cp assets/js -r $template_folder -cp assets/custom.css $template_folder -cp assets/custom.html $template_folder