summaryrefslogtreecommitdiff
path: root/jh.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-09-28 10:38:59 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-09-28 10:38:59 -0400
commitc6ce7d6ba0272ab78b2dd09e3fadc49b577961c0 (patch)
tree75a6d404e620f405c456dc669b0f6a9b8d352238 /jh.sh
parent8946dd3f509a242b8ec06dbaf5522113f56671fb (diff)
Change how the main help menu works
Diffstat (limited to 'jh.sh')
-rw-r--r--jh.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/jh.sh b/jh.sh
index a7c25a9..7dfe3c5 100644
--- a/jh.sh
+++ b/jh.sh
@@ -12,7 +12,12 @@ fi
usage() {
cmd="${1-$0}"
file="$JH_PATH/jh-$cmd.help.txt"
- if [[ -f "$JH_PATH/jh-$cmd.help.txt" ]]; then
+ if [[ -z "$cmd" ]]; then
+ echo "Usage: $jh_short <command> [command-specific-arguments]"
+ echo "Java helper for PKGBUILDs"
+ echo ""
+ "$jh_short" list-commands|sed 's/./ &/'
+ elif [[ -f "$JH_PATH/jh-$cmd.help.txt" ]]; then
sed "s|@cmd@|$jh_short|g" "$file" >> /dev/stderr
else
echo "$jh_short: Cannot find help file for '$cmd'" >> /dev/stderr