1 | #!/usr/bin/env bash
|
2 | dir="$(dirname "$(readlink -f "$0")")"
|
3 |
|
4 | help() {
|
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
|
14 | if [[ "$2" == "--help" ]]; then help "$1"
|
15 | elif [[ "$1" == "--help" ]]; then help
|
16 | elif [[ "$1" == "help" ]]; then help "$2"
|
17 | else "$dir/nvgraph" "$@"; fi
|
18 |
|
\ | No newline at end of file |