source: scripts/usr/local/lib/7dtd/help.sh@ 68

Last change on this file since 68 was 23, checked in by alloc, 11 years ago

Version 6: Instance editing more userfriendly

File size: 556 bytes
RevLine 
[17]1#!/bin/bash
2
3genericHelp() {
4 line() {
5 printf " %-*s %s\n" 15 "$1" "$2"
6 }
7
8 echo
9 if [ ! -z $1 ]; then
10 echo "Unknown command: $1"
11 fi
12 echo "Usage: $(basename $0) <command> [parameters]"
13 echo
14 echo "Commands are:"
15
16 for C in $(listCommands); do
17 if [ "$(type -t sdtdCommand$(camelcasePrep $C)Description)" = "function" ]; then
18 line "${C}" "$(sdtdCommand$(camelcasePrep $C)Description)"
19 else
20 line "${C}" "TODO: Description"
21 fi
22 done
23
24 echo
25 echo "Use \"$(basename $0) help <command>\" to get further details on a specific command."
26}
27
28
Note: See TracBrowser for help on using the repository browser.