mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-15 09:21:06 +02:00
22 lines
385 B
Bash
Executable File
22 lines
385 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
YANG_ROOT=$1
|
|
|
|
CONFDC_ARGS=' -c'
|
|
|
|
# YANGPATHS
|
|
for path in $(find $YANG_ROOT -type d); do
|
|
CONFDC_ARGS+=" --yangpath $path"
|
|
done
|
|
|
|
# create output dir
|
|
mkdir -p fxs
|
|
|
|
# compile .yang s
|
|
for yang in $(find $YANG_ROOT -type f -name '*.yang'); do
|
|
BASE=$(basename $yang)
|
|
OUT="${BASE%.yang}.fxs"
|
|
echo "Compiling..$yang"
|
|
confdc $CONFDC_ARGS -o fxs/$OUT -- $yang
|
|
done
|