aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-26 04:48:56 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-26 04:48:56 +0300
commit469ad1e765cd34523baf4015c3d21d7432c5ab0d (patch)
tree2ad9ce61304d38fe0fe02d67eac957f611ba04b0
parentlist_repo_*: add command line options (diff)
downloadlinux-home-469ad1e765cd34523baf4015c3d21d7432c5ab0d.tar.gz
linux-home-469ad1e765cd34523baf4015c3d21d7432c5ab0d.zip
fix/add missing usage messages for functions
Diffstat (limited to '')
-rw-r--r--.bashrc_cxx14
-rw-r--r--.bashrc_pgn2
-rw-r--r--.bashrc_third_party2
3 files changed, 14 insertions, 4 deletions
diff --git a/.bashrc_cxx b/.bashrc_cxx
index dc1eaf5..b3b5bee 100644
--- a/.bashrc_cxx
+++ b/.bashrc_cxx
@@ -13,11 +13,16 @@ runc() (
case "$1" in
--c-flags)
if [ "$#" -le 1 ]; then
- echo "$FUNCNAME: usage error: missing value for option: $1" >&2
+ echo "$FUNCNAME: missing argument for parameter: $1" >&2
return 1
fi
shift ; c_flags+=("$1") ; shift ;;
+ -h)
+ echo "usage: $FUNCNAME [-h] [--c-flags FLAG]"
+ return 0
+ ;;
+
--)
shift ; break ;;
@@ -53,11 +58,16 @@ runcxx() (
case "$1" in
--cxx-flags)
if [ "$#" -le 1 ]; then
- echo "$FUNCNAME: usage error: missing value for option: $1" >&2
+ echo "$FUNCNAME: missing argument for parameter: $1" >&2
return 1
fi
shift ; cxx_flags+=("$1") ; shift ;;
+ -h)
+ echo "usage: $FUNCNAME [-h] [--cxx-flags FLAG]"
+ return 0
+ ;;
+
--)
shift ; break ;;
diff --git a/.bashrc_pgn b/.bashrc_pgn
index 23d83b1..4e73e76 100644
--- a/.bashrc_pgn
+++ b/.bashrc_pgn
@@ -15,7 +15,7 @@ normalize_pgn() {
append_pgn() {
if [ "$#" -ne 2 ]; then
- echo "$FUNCNAME: usage: $FUNCNAME DEST_PGN SRC_PGN" >&2
+ echo "usage: $FUNCNAME DEST_PGN SRC_PGN" >&2
return 1
fi
diff --git a/.bashrc_third_party b/.bashrc_third_party
index 30a3b2b..cddbb6c 100644
--- a/.bashrc_third_party
+++ b/.bashrc_third_party
@@ -22,7 +22,7 @@ symlink_preferences() (
set -o errexit
if [ "$#" -ne 2 ]; then
- echo "$FUNCNAME: usage: $FUNCNAME SRC_DIR DEST_DIR" >&2
+ echo "usage: $FUNCNAME SRC_DIR DEST_DIR" >&2
return 1
fi