blob: 1ced1b61bc62ca7554382231f00c31e6c22e396f [file] [log] [blame]
Alexander Afanasyev9c45c642017-03-18 15:29:42 -07001#!/bin/sh
2
3function usage() {
4 echo
5 echo Available commands:
6 for command in $(ls /Applications/NDN.app/Contents/Helpers/ 2>/dev/null); do
7 echo " $command"
8 done
9 for command in $(ls /Applications/NDN.app/Contents/Resources/bin/ 2>/dev/null); do
10 echo " $command"
11 done
12}
13
14if [[ $# -eq 0 ]]; then
15 echo ERROR: No command is specified
16 usage
17 exit 1
18fi
19
20if [[ -f /Applications/NDN.app/Contents/Helpers/"$1" ]]; then
21 /Applications/NDN.app/Contents/Helpers/"$@"
22elif [[ -f /Applications/NDN.app/Contents/Resources/bin/"$1" ]]; then
23 /Applications/NDN.app/Contents/Resources/bin/"$@"
24else
25 echo ERROR: Unknown is specified
26 usage
27 exit 1
28fi