pointed out by checkbashisms
Issue-ID: OOM-264
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Ief3b2595a55f0e7a0a2e7ab05857848c99ce42f9
for line in `parse_yaml $filename`
do
#skiping commented line
for line in `parse_yaml $filename`
do
#skiping commented line
- if [ "${line:0:1}" != '#' ]; then
+ if echo "$line" | grep -v '^#' >/dev/null; then
#find all image subtag inside converted values.yaml file's lines
if echo $line | grep -q $IMAGE_TEXT ; then
#find imageName inside line
#find all image subtag inside converted values.yaml file's lines
if echo $line | grep -q $IMAGE_TEXT ; then
#find imageName inside line
- FLAGS=${@:3}
- CHART_REPO="$(echo "$CHART_URL" |cut -d'/' -f1)"
- CHART_NAME="$(echo "$CHART_URL" |cut -d'/' -f2)"
+ FLAGS=$(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//')
+ CHART_REPO="$(echo "$CHART_URL" | cut -d'/' -f1)"
+ CHART_NAME="$(echo "$CHART_URL" | cut -d'/' -f2)"
if expr "$HELM_VER" : "v3\..*" ; then
CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
else
if expr "$HELM_VER" : "v3\..*" ; then
CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
else
+ deploy $1 $2 $(echo ${@} | sed 's/^ *[^ ]* *[^ ]* *//')
+ undeploy $1 $(echo ${@} | sed 's/^ *[^ ]* *//')
# If the user is trying to run Consul directly with some arguments, then
# pass them to Consul.
# If the user is trying to run Consul directly with some arguments, then
# pass them to Consul.
-if [ "${1:0:1}" = '-' ]; then
+if echo "$1" | grep '^-' >/dev/null; then
installArgs=${installArgs}" --auth-root-authentication-method=normal"
fi
# "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here)
installArgs=${installArgs}" --auth-root-authentication-method=normal"
fi
# "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here)
- mysql_install_db ${installArgs} "${@:2}"
+ mysql_install_db ${installArgs} "$(echo ${@} | sed 's/^ *[^ ]* *//')"
mysql_note "Database files initialized"
}
mysql_note "Database files initialized"
}
_main() {
# if command starts with an option, prepend mysqld
_main() {
# if command starts with an option, prepend mysqld
- if [ "${1:0:1}" = '-' ]; then
+ if echo "$1" | grep '^-' >/dev/null; then