diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-11-15 08:55:11 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-11-15 08:55:11 +0300 |
commit | 813ad503a51ef863c5d9235657327791c75060fc (patch) | |
tree | eac067b998d304c9329513ae610bb76474183a2c /update.sh | |
parent | bugfix (diff) | |
download | config-links-813ad503a51ef863c5d9235657327791c75060fc.tar.gz config-links-813ad503a51ef863c5d9235657327791c75060fc.zip |
usage message update
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -45,7 +45,7 @@ check_symlinks_enabled_cygwin() { # Utility routines -readonly script_argv0="${BASH_SOURCE[0]}" +readonly script_argv0="$( printf '%q' "${BASH_SOURCE[0]}" )" dump() { local prefix="${FUNCNAME[0]}" @@ -111,7 +111,10 @@ traverse_path() { local destfd=1 [ "$exit_with_usage" -ne 0 ] && destfd=2 - echo "usage: ${FUNCNAME[0]} [-h|--help] [-0|-z|--zero] [-e|--exist] [-f|--file] [-d|--directory] [--] [PATH]..." >&"$destfd" || true + local msg + IFS= read -d '' -r msg <<MSG || echo -n "$msg" >&"$destfd" || true +usage: ${FUNCNAME[0]} [-h|--help] [-0|-z|--zero] [-e|--exist] [-f|--file] [-d|--directory] [--] [PATH]... +MSG return "$exit_with_usage" fi @@ -394,7 +397,8 @@ exit_with_usage() { local msg IFS= read -d '' -r msg <<MSG || echo -n "$msg" >&"$destfd" || true usage: $script_argv0 [-h|--help] [-d|--database PATH] [-s|--shared-dir DIR] [-n|--dry-run] -optional parameters: + +parameters: -h,--help show this message and exit -d,--database set database file path -s,--shared-dir set top-level shared directory path |