mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Usage examples:
Run yanglint on all infix models:
ixyang check
Lint a single model:
ixyang lint infix-interfaces
Dump a tree of ietf-interfaces with all infix augments:
ixyang lint infix-interfaces ietf-interfaces -- -f tree
34 lines
613 B
Bash
34 lines
613 B
Bash
|
|
resolve_o()
|
|
{
|
|
[ -n "$O" ] && return
|
|
|
|
if [ -f ".config" ] && [ -d "output" ]; then
|
|
# Buildroot
|
|
O=$(readlink -f ./output)
|
|
elif [ -f "output/.config" ]; then
|
|
# BR2_EXTERNAL
|
|
O=$(readlink -f ./output)
|
|
elif [ -f ".config" ] && [ -d "host" ]; then
|
|
# Called from inside output/ directory
|
|
O=$(readlink -f .)
|
|
else
|
|
echo "*** Error: cannot find Buildroot output dir!" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
resolve_host_dir()
|
|
{
|
|
[ -n "$HOST_DIR" ] && return
|
|
|
|
resolve_o
|
|
|
|
if ! [ -d "$O/host" ]; then
|
|
echo "*** Error: cannot find Buildroot host binaries dir!" >&2
|
|
exit 1
|
|
fi
|
|
|
|
HOST_DIR="$O/host"
|
|
}
|