Restructure the project tree

This commit is contained in:
moznion
2020-11-29 12:45:35 +09:00
parent 388abee17a
commit 0ef10d8554
31 changed files with 113 additions and 149 deletions
+25
View File
@@ -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