diff options
Diffstat (limited to 'src/nohup.sh')
-rwxr-xr-x | src/nohup.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/nohup.sh b/src/nohup.sh index 00908b5ba..3eae66747 100755 --- a/src/nohup.sh +++ b/src/nohup.sh @@ -22,11 +22,35 @@ # it to be somewhere else in PATH if not installed yet. PATH=@bindir@:$PATH +usage="Usage: $0 COMMAND [ARG]... + or: $0 OPTION" + +usage_try=" +Try \`$0 --help' for more information." + +usage_help=" + --help display this help and exit + --version output version information and exit" + if [ $# -eq 0 ]; then - echo "Usage: nohup command [arg...]" 2>&1 + echo >&2 "$usage" + echo >&2 "$usage_try" exit 1 fi +case $# in + 1 ) + case "z${1}" in + z--help ) + echo "$usage"; echo "$usage_help"; exit 0 ;; + z--version ) + echo "nohup - @VERSION@"; exit 0 ;; + * ) ;; + esac + ;; + * ) ;; +esac + trap "" 1 oldmask=`umask`; umask 077 # Only redirect the output if the user didn't already do it. |