Scott Baker | 14c8f18 | 2019-05-22 18:05:29 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
| 2 | # Portions copyright 2019-present Open Networking Foundation |
| 3 | # Original copyright 2019-present Ciena Corporation |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | |
| 15 | MOCK_SCRIPT=/xos/mock-v1.js |
| 16 | |
| 17 | while getopts ":12h" opt; do |
| 18 | case ${opt} in |
| 19 | 1) |
| 20 | MOCK_SCRIPT=/xos/mock-v1.js |
| 21 | ;; |
| 22 | h) |
| 23 | echo "usage: $PROG [-1|-2] [-h]" |
| 24 | echo " -1 Mock version 1 XOS server" |
| 25 | echo " -h Display this message" |
| 26 | exit 0 |
| 27 | ;; |
| 28 | *) |
| 29 | echo "usage: $PROG [-1|-2] [-h]" |
| 30 | echo " -1 Mock version 1 XOS server" |
| 31 | echo " -h Display this message" |
| 32 | exit 1 |
| 33 | ;; |
| 34 | esac |
| 35 | done |
| 36 | |
| 37 | node $MOCK_SCRIPT |