Skip to content

Commit 629101f

Browse files
author
Toby Ferguson
committed
Updated usage and error messages
1 parent fd6ed42 commit 629101f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

entrypoint.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/bin/bash
22

3-
[ 3 -le $# -a $# -le 5 ] || {
4-
cat <<EOF
5-
icn USER PASSWORD HOSTNAME [PORT]
3+
[ 3 -le $# -a $# -lt 5 ] || {
4+
cat 1>&2 <<-EOF
5+
$(basename $0): ERROR: Expected between 3 and 4 arguments, got $# ${@:-"$@"}
66
7-
Initialize Configured Namespace for USER with PASSWORD connecting to HOSTNAME on PORT (defaults to 3306)
7+
$(basename $0): Usage: $(basename $0) USER PASSWORD HOSTNAME [PORT]
8+
Initialize Configured Namespace for USER with PASSWORD
9+
connecting to HOSTNAME on PORT (default: 3306)
810
EOF
9-
exit 1;
10-
}
11+
exit 1;
12+
}
1113

1214
export MYSQL_PWD=${2:?"No password provided"}
1315
mysql <source_this.sql \

0 commit comments

Comments
 (0)