Tweak usage strings

This commit is contained in:
Scott Lahteine 2019-01-23 23:05:42 -06:00
parent 0f07ba4f09
commit 2117a45d1a
13 changed files with 13 additions and 13 deletions

View file

@ -157,7 +157,7 @@ uint8_t* get_utf8_value(uint8_t *pstart, wchar_t *pval) {
} }
void usage(char* progname) { void usage(char* progname) {
fprintf(stderr, "Usage: %s\n", progname); fprintf(stderr, "usage: %s\n", progname);
fprintf(stderr, " read data from stdin\n"); fprintf(stderr, " read data from stdin\n");
} }

View file

@ -6,7 +6,7 @@
# commit log to watch Travis CI progress. # commit log to watch Travis CI progress.
# #
[[ $# == 0 ]] || { echo "Usage: `basename $0`" 1>&2 ; exit 1; } [[ $# == 0 ]] || { echo "usage: `basename $0`" 1>&2 ; exit 1; }
MFINFO=$(mfinfo) || exit 1 MFINFO=$(mfinfo) || exit 1
IFS=' ' read -a INFO <<< "$MFINFO" IFS=' ' read -a INFO <<< "$MFINFO"

View file

@ -13,7 +13,7 @@ case "$1" in
-[Hh]) TYPE=HTTPS ; MATCH="git@" ; FORMULA="$GH_SSH/$GH_HTTPS" ;; -[Hh]) TYPE=HTTPS ; MATCH="git@" ; FORMULA="$GH_SSH/$GH_HTTPS" ;;
-[Ss]) TYPE=SSH ; MATCH="https:" ; FORMULA="$GH_HTTPS/$GH_SSH" ;; -[Ss]) TYPE=SSH ; MATCH="https:" ; FORMULA="$GH_HTTPS/$GH_SSH" ;;
*) *)
echo "Usage: `basename $0` -h | -s" 1>&2 echo "usage: `basename $0` -h | -s" 1>&2
echo -e " \e[0;92m-h\e[0m to switch to HTTPS" 1>&2 echo -e " \e[0;92m-h\e[0m to switch to HTTPS" 1>&2
echo -e " \e[0;92m-s\e[0m to switch to SSH" 1>&2 echo -e " \e[0;92m-s\e[0m to switch to SSH" 1>&2
exit 1 exit 1

View file

@ -7,7 +7,7 @@
# Example: mfadd thinkyhead:patch-1 copy_of_patch-1 # Example: mfadd thinkyhead:patch-1 copy_of_patch-1
# #
[[ $# > 0 && $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` (user | ref copyname)" 1>&2 ; exit 1; } [[ $# > 0 && $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` (user | ref copyname)" 1>&2 ; exit 1; }
# If a colon is included, split the parts # If a colon is included, split the parts
if [[ $1 =~ ":" ]]; then if [[ $1 =~ ":" ]]; then

View file

@ -5,7 +5,7 @@
# Start Jekyll in watch mode to work on Marlin Documentation and preview locally # Start Jekyll in watch mode to work on Marlin Documentation and preview locally
# #
[[ $# == 0 ]] || { echo "Usage: `basename $0`" 1>&2 ; exit 1; } [[ $# == 0 ]] || { echo "usage: `basename $0`" 1>&2 ; exit 1; }
MFINFO=$(mfinfo "$@") || exit 1 MFINFO=$(mfinfo "$@") || exit 1
IFS=' ' read -a INFO <<< "$MFINFO" IFS=' ' read -a INFO <<< "$MFINFO"

View file

@ -6,7 +6,7 @@
# By default: `git push upstream HEAD:bugfix-1.1.x` # By default: `git push upstream HEAD:bugfix-1.1.x`
# #
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; } [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; }
if [[ $1 == '1' || $1 == '2' ]]; then if [[ $1 == '1' || $1 == '2' ]]; then
MFINFO=$(mfinfo "$1") || exit 1 MFINFO=$(mfinfo "$1") || exit 1

View file

@ -12,7 +12,7 @@
# - Current Branch # - Current Branch
# #
# usage() { echo "Usage: `basename $0` [1|2] [branch]" 1>&2 ; } # usage() { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; }
# [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; } # [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; }
CURR=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g') CURR=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g')

View file

@ -5,7 +5,7 @@
# Create the upstream remote for a forked repository # Create the upstream remote for a forked repository
# #
[[ $# == 0 ]] || { echo "Usage: `basename $0`" 1>&2 ; exit 1; } [[ $# == 0 ]] || { echo "usage: `basename $0`" 1>&2 ; exit 1; }
[[ -z $(git branch 2>/dev/null | grep ^* | sed 's/\* //g') ]] && { echo "No git repository here!" 1>&2 ; exit 1; } [[ -z $(git branch 2>/dev/null | grep ^* | sed 's/\* //g') ]] && { echo "No git repository here!" 1>&2 ; exit 1; }

View file

@ -6,7 +6,7 @@
# #
usage() { usage() {
echo "Usage: `basename $0` [1|2] [name]" 1>&2 echo "usage: `basename $0` [1|2] [name]" 1>&2
} }
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; } [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; }

View file

@ -5,7 +5,7 @@
# Make a PR of the current branch against RCBugFix or dev # Make a PR of the current branch against RCBugFix or dev
# #
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1; } [[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [branch]" 1>&2 ; exit 1; }
MFINFO=$(mfinfo "$@") || exit 1 MFINFO=$(mfinfo "$@") || exit 1
IFS=' ' read -a INFO <<< "$MFINFO" IFS=' ' read -a INFO <<< "$MFINFO"

View file

@ -9,7 +9,7 @@
# any permanent changes to 'master'. # any permanent changes to 'master'.
# #
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1; } [[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [branch]" 1>&2 ; exit 1; }
MFINFO=$(mfinfo "$@") || exit 1 MFINFO=$(mfinfo "$@") || exit 1
IFS=' ' read -a INFO <<< "$MFINFO" IFS=' ' read -a INFO <<< "$MFINFO"

View file

@ -5,7 +5,7 @@
# Add all changed files, commit as "patch", do `mfrb` and `git push -f` # Add all changed files, commit as "patch", do `mfrb` and `git push -f`
# #
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [1|2]" 1>&2 ; exit 1; } [[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1; }
MFINFO=$(mfinfo "$@") || exit 1 MFINFO=$(mfinfo "$@") || exit 1
IFS=' ' read -a INFO <<< "$MFINFO" IFS=' ' read -a INFO <<< "$MFINFO"

View file

@ -7,7 +7,7 @@
# - Force-push the branch to 'origin' # - Force-push the branch to 'origin'
# #
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1; } [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1; }
MFINFO=$(mfinfo "$@") || exit 1 MFINFO=$(mfinfo "$@") || exit 1
IFS=' ' read -a INFO <<< "$MFINFO" IFS=' ' read -a INFO <<< "$MFINFO"