mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 15:28:43 +01:00
Add helper script to generate the code
This commit is contained in:
@@ -2,6 +2,4 @@ build:
|
|||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
gen:
|
gen:
|
||||||
cat /dev/null > $(PWD)/src/rfc2865.rs
|
bash ./scripts/generate_code.sh
|
||||||
cargo run --bin code_gen $(PWD)/dicts/dictionary.rfc2865 $(PWD)/src/rfc2865.rs
|
|
||||||
cargo fmt
|
|
||||||
|
|||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
REPO_ROOT="$(cd ./"$(git rev-parse --show-cdup)" || exit; pwd)"
|
||||||
|
|
||||||
|
DICT_NAMES=(
|
||||||
|
"rfc2865"
|
||||||
|
)
|
||||||
|
|
||||||
|
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"
|
||||||
|
done
|
||||||
|
|
||||||
|
cargo fmt
|
||||||
|
|
||||||
Reference in New Issue
Block a user