mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-29 12:38:41 +01:00
Restructure the project tree
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
REPO_ROOT="$(cd ./"$(git rev-parse --show-cdup)" || exit; pwd)"
|
||||
DICTS_DIR="${REPO_ROOT}/dicts"
|
||||
SRC_DIR="${REPO_ROOT}/radius/src"
|
||||
|
||||
DICTS=$(ls "$DICTS_DIR")
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
for DICT in ${DICTS[@]}; do
|
||||
DICT_NAME="${DICT##*.}"
|
||||
cat /dev/null > "${SRC_DIR}/${DICT_NAME}.rs"
|
||||
done
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
for DICT in ${DICTS[@]}; do
|
||||
DICT_NAME="${DICT##*.}"
|
||||
cargo run --bin code-generator "${DICTS_DIR}/dictionary.${DICT_NAME}" "${SRC_DIR}/${DICT_NAME}.rs"
|
||||
done
|
||||
|
||||
cargo fix --allow-dirty --allow-staged
|
||||
cargo fmt
|
||||
|
||||
Reference in New Issue
Block a user