blob: 1ced1b61bc62ca7554382231f00c31e6c22e396f [file] [log] [blame]
#!/bin/sh
function usage() {
echo
echo Available commands:
for command in $(ls /Applications/NDN.app/Contents/Helpers/ 2>/dev/null); do
echo " $command"
done
for command in $(ls /Applications/NDN.app/Contents/Resources/bin/ 2>/dev/null); do
echo " $command"
done
}
if [[ $# -eq 0 ]]; then
echo ERROR: No command is specified
usage
exit 1
fi
if [[ -f /Applications/NDN.app/Contents/Helpers/"$1" ]]; then
/Applications/NDN.app/Contents/Helpers/"$@"
elif [[ -f /Applications/NDN.app/Contents/Resources/bin/"$1" ]]; then
/Applications/NDN.app/Contents/Resources/bin/"$@"
else
echo ERROR: Unknown is specified
usage
exit 1
fi