Skip to content
Snippets Groups Projects
Commit 4ff183c6 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

fix usage with 1st param "name"

parent 3abfe9d3
Branches
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@
# ----- read cli params
method=GET
echo "$1" | grep -E "^(GET|PUT|POST|DELETE)$" >/dev/null
if [ $? -eq 0 ]; then
if echo "$1" | grep -E "^(GET|PUT|POST|DELETE)$" >/dev/null
then
method=$1
shift 1
fi
......
......@@ -6,6 +6,7 @@
# ----------------------------------------------------------------------
# 2021-10-29 v1.0 <axel.hahn@iml.unibe.ch>
# 2022-01-14 v1.0 <axel.hahn@iml.unibe.ch> 1st public version
# 2022-03-01 v1.1 <axel.hahn@iml.unibe.ch> fix usage with 1st param "name"
# ======================================================================
......@@ -39,8 +40,8 @@ exit 0
fi
mytype=name
echo "$1" | grep -E '^(host|alias)$' >/dev/null
if [ $? -eq 0 ]; then
if echo "$1" | grep -E '^(name|alias)$' >/dev/null
then
mytype=$1
shift 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment