UNPKG

488 Bapplication/x-shView Raw
1#!/usr/bin/env bash
2dir="$(dirname "$(readlink -f "$0")")"
3
4help() {
5 fil="$dir/man/$1.txt"
6 url="https://github.com/nodef/nvgraph.sh/issues"
7 if [[ "$1" == "" ]]; then less "$dir/man/help.txt"
8 elif [ -f "$fil" ]; then less "$fil"
9 else echo "No help found for '$1'. You can report this at ${url}"; fi
10}
11
12
13# Call nvgraph
14if [[ "$2" == "--help" ]]; then help "$1"
15elif [[ "$1" == "--help" ]]; then help
16elif [[ "$1" == "help" ]]; then help "$2"
17else "$dir/nvgraph" "$@"; fi
18
\No newline at end of file