mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-29 11:08:41 +01:00
Fix code generator to ensure the order of the generated values
This commit is contained in:
@@ -3,14 +3,16 @@
|
||||
set -eu
|
||||
|
||||
REPO_ROOT="$(cd ./"$(git rev-parse --show-cdup)" || exit; pwd)"
|
||||
DICTS_DIR="${REPO_ROOT}/dicts"
|
||||
SRC_DIR="${REPO_ROOT}/src"
|
||||
|
||||
DICT_NAMES=(
|
||||
"rfc2865"
|
||||
)
|
||||
DICTS=$(ls "$DICTS_DIR")
|
||||
|
||||
for DICT_NAME in "${DICT_NAMES[@]}"; do
|
||||
cat /dev/null > "${REPO_ROOT}/src/${DICT_NAME}.rs"
|
||||
cargo run --bin code_gen "${REPO_ROOT}/dicts/dictionary.${DICT_NAME}" "${REPO_ROOT}/src/${DICT_NAME}.rs"
|
||||
# shellcheck disable=SC2068
|
||||
for DICT in ${DICTS[@]}; do
|
||||
DICT_NAME="${DICT##*.}"
|
||||
cat /dev/null > "${SRC_DIR}/${DICT_NAME}.rs"
|
||||
cargo run --bin code_gen "${DICTS_DIR}/dictionary.${DICT_NAME}" "${SRC_DIR}/${DICT_NAME}.rs"
|
||||
done
|
||||
|
||||
cargo fmt
|
||||
|
||||
Reference in New Issue
Block a user