blob: 1c1b473bd2efd1a2f7a954874b581c216d331ea4 [file] [log] [blame]
Qi Zhao9d6442e2017-03-22 00:40:11 -05001#!/bin/sh
2
3NDN=`readlink "$0"`
4NDN_APP=`dirname "$NDN"`/..
5
6function usage() {
7 echo
8 echo Available commands:
9 for command in $(ls "$NDN_APP/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 "$NDN_APP"/Helpers/"$1" ]]; then
21 "$NDN_APP"/Helpers/"$@"
22elif [[ -f "$NDN_APP"/Resources/bin/"$1" ]]; then
23 "$NDN_APP"/Resources/bin/"$@"
24else
25 echo ERROR: Unknown is specified
26 usage
27 exit 1
28fi