diff options
-rwxr-xr-x | pbs-help | 4 | ||||
-rw-r--r-- | pbs-plumb-shlib | 8 | ||||
-rwxr-xr-x | pbs.in | 22 |
3 files changed, 10 insertions, 24 deletions
@@ -10,14 +10,14 @@ list_commands() { } master_usage() { - echo "Usage: ${pbs_short:-${stem}} COMMAND [OPTIONS]" + echo "Usage: ${stem} COMMAND [OPTIONS]" echo echo "Commands:" list_commands | sed 's/^/ /' } help_usage() { - echo "Usage: ${pbs_short:-${stem}} help [OPTIONS] COMMAND" + echo "Usage: ${stem} help [OPTIONS] COMMAND" echo "Shows the manual page for a command" echo '' echo 'Options:' diff --git a/pbs-plumb-shlib b/pbs-plumb-shlib index ded9825..5f2014c 100644 --- a/pbs-plumb-shlib +++ b/pbs-plumb-shlib @@ -7,13 +7,7 @@ # Usage: in_git # Returns 0 if somewhere in a git repository, nonzero if not. in_git() { - git rev-parse --git-dir &>/dev/null -} - -# Usage: gitdir -# Prints the .git directory for the repository we're in -gitdir() { - git rev-parse --git-dir + gitroot &>/dev/null } # Usage: gitroot @@ -1,21 +1,13 @@ #!/bin/bash -if [[ -z PBS_PATH ]]; then +if [[ -z $PBS_PATH ]]; then export PBS_PATH=@pbs-bindir@ fi -if [[ -z "$pbs_cmd" ]]; then - export pbs_cmd=$0 - export pbs_short=${pbs_cmd##*/} - export PATH="$PBS_PATH:$PATH" -fi - -main() { - if [[ $# < 1 ]]; then - pbs-help - return 1 - fi - pbs-"$@" -} +export PATH="$PBS_PATH:$PATH" -main "$@" +if [[ $# < 1 ]]; then + pbs-help + return 1 +fi +pbs-"$@" |