From 881e00fa7e46c7445f28f91eaf6b57e3db00e524 Mon Sep 17 00:00:00 2001 From: Finn Brewer Date: Thu, 15 Aug 2024 11:51:20 -0700 Subject: [PATCH] chore: remove old way of handling templates --- data/language_templates/lithuanian.toml | 1 - scripts/update_language_templates.bash | 37 ------------------------- 2 files changed, 38 deletions(-) delete mode 100644 scripts/update_language_templates.bash diff --git a/data/language_templates/lithuanian.toml b/data/language_templates/lithuanian.toml index 0c92f0f..e58dce2 100644 --- a/data/language_templates/lithuanian.toml +++ b/data/language_templates/lithuanian.toml @@ -1,4 +1,3 @@ -# Indo-European | Baltic | Full Support model = "lt" frequency_list = true spyglys_details = true diff --git a/scripts/update_language_templates.bash b/scripts/update_language_templates.bash deleted file mode 100644 index fce910f..0000000 --- a/scripts/update_language_templates.bash +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -set -o errexit # abort on nonzero exitstatus -set -o nounset # abort on unbound variable -set -o pipefail # don't hide errors within pipes - -echo "make sure to run from the root directory" -readarray -t existing_tags < <(sed -n '/const tagColors/,/TAGS OVER/s/\s*\["\(.*\)",.*\,],$/\1/p' src/components/generated/NewLanguage.vue) -echo "Existing tags: ${existing_tags[@]}" - -tmp_name="tmp_language_gen" - -echo " // START" >> "$tmp_name" -for fileName in data/language_templates/*.toml; do - echo "handling ${fileName}..." - IFS='|' read -r -a tags < <(head -n 1 "$fileName" | cut -c 2-) - echo -n " [\"$fileName\", [" >> "$tmp_name" - for tag in "${tags[@]}"; do - tag=$(echo "$tag" | xargs) - echo -n "\"$tag\", " >> "$tmp_name" - - tag_exists=false - for existing_tag in "${existing_tags[@]}"; do - if [ "$existing_tag" = "$tag" ]; then - tag_exists=true - fi - done - - if [[ "$tag_exists" = false ]]; then - echo "WARNING: $tag does not have an assigned color!" - fi - done - echo "]," >> "$tmp_name" -done -echo " // END" >> "$tmp_name" - -sed -i "/START/,/END/d; /Custom/r $tmp_name" src/components/generated/NewLanguage.vue -rm "$tmp_name"