Thomas Vachuska | 73436b5 | 2017-03-22 19:50:47 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
2 | # ----------------------------------------------------------------------------- | ||||
3 | # Extracts YANG model schema and YANG sources from a YANG model jar. | ||||
4 | # ----------------------------------------------------------------------------- | ||||
5 | |||||
6 | output=$1 | ||||
7 | jar=$2 | ||||
8 | |||||
9 | aux=/tmp/ys-$$ | ||||
10 | trap "rm -fr $aux" EXIT | ||||
11 | |||||
12 | rm -fr $aux | ||||
13 | mkdir -p $aux $output | ||||
14 | |||||
15 | cd $aux | ||||
16 | jar xf $jar | ||||
17 | mv yang/* $output |