···11-lex gen-server ./src ./../../lexicons/**/*.* --yes
11+#!/bin/bash
22+set -e
33+44+# Navigate to the lexicons directory and find all .json files
55+cd ../../lexicons
66+json_files=$(find . -name "*.json" -type f)
77+88+# Go back to the lexicons package directory
99+cd ../packages/lexicons
1010+1111+# Check if we found any lexicon files
1212+if [ -z "$json_files" ]; then
1313+ echo "No lexicon files found in ../../lexicons/"
1414+ exit 1
1515+fi
1616+1717+# Convert the file list to absolute paths
1818+lexicon_paths=""
1919+for file in $json_files; do
2020+ lexicon_paths="$lexicon_paths ../../lexicons/$file"
2121+done
2222+2323+# Generate lexicons
2424+echo "Generating lexicons from: $lexicon_paths"
2525+lex gen-server ./src $lexicon_paths --yes