Skip to content

Commit

Permalink
Implemented suggestions for shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-contreras committed Jan 4, 2024
1 parent e8de8e7 commit 7e3ca09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/example/oc-network-instance/generate_bindings.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
SDIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SDIR="$(cd -P "$(dirname "$[0]")" && pwd)"
DDIR=$SDIR/models
mkdir $DDIR

git clone https://github.com/openconfig/public $DDIR
export PYBINDPLUGIN=`/usr/bin/env python3 -c 'import pyangbind; import os; print ("{}/plugin".format(os.path.dirname(pyangbind.__file__)))'`
pyang --plugindir $PYBINDPLUGIN -f pybind -o binding.py docs/example/oc-network-instance/models/release/models/network-instance/openconfig-network-instance.yang -p ./docs/example/oc-network-instance/models/release/models/

pyang --plugindir $PYBINDPLUGIN -f pybind -o $SDIR/binding.py -p $DDIR/ $DDIR/release/models/network-instance/openconfig-network-instance.yang
echo "bindings.py successfully generated on current directory!"
rm -rf $DDIR

0 comments on commit 7e3ca09

Please sign in to comment.