There was an error while loading. Please reload this page.
1 parent a167a73 commit 9f1eb5dCopy full SHA for 9f1eb5d
1 file changed
lib/createdb.sh
@@ -50,12 +50,13 @@ set_dbuserpass () {
50
}
51
52
add_granthost () {
53
- if expr "x$1" : 'x[-a-zA-Z0-9.*%_][-a-zA-Z0-9.*%_]*$' >/dev/null; then
54
- granthosts="$granthosts $1"
55
- else
+ case "$1" in
+ ""|*[!a-zA-Z0-9.*%_]*)
56
echo "Expected --grant-host=HOSTNAME" 1>&2
57
- usage
58
- fi
+ usage;;
+ *)
+ granthosts="$granthosts $1";;
59
+ esac
60
61
62
PROG=$0
0 commit comments