Skip to content

Commit

Permalink
fixed escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelenglert committed Apr 18, 2018
1 parent 13b1692 commit bf89de7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions act.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
ACT_VERSION="v0.3.0"
ACT_LAST_COMMIT="1682ba551b5d65892f300b5a737b46e1c0f691af"
ACT_LAST_COMMIT="13b1692a909cb01fbf21c38ef46ac9950d92b7be"
USER_CONFIG="$HOME/.appdynamics/act/config.sh"
GLOBAL_CONFIG="/etc/appdynamics/act/config.sh"
CONFIG_CONTROLLER_COOKIE_LOCATION="/tmp/appdynamics-controller-cookie.txt"
Expand Down Expand Up @@ -60,7 +60,7 @@ function apiCall {
do
case "${opt}" in
X)
METHOD=${OPTARG}
METHOD=${OPTARG}
;;
d)
PAYLOAD=${OPTARG}
Expand Down Expand Up @@ -103,10 +103,10 @@ function apiCall {
debug "Applying $opt with $ARG"
# PAYLOAD=${PAYLOAD//\$\{${opt}\}/$OPTARG}
# ENDPOINT=${ENDPOINT//\$\{${opt}\}/$OPTARG}
while [[ $PAYLOAD =~ \${$opt\??} ]] ; do
while [[ $PAYLOAD =~ \$\{$opt\??\} ]] ; do
PAYLOAD=${PAYLOAD//${BASH_REMATCH[0]}/$OPTARG}
done;
while [[ $ENDPOINT =~ \${$opt\??} ]] ; do
while [[ $ENDPOINT =~ \$\{$opt\??\} ]] ; do
ENDPOINT=${ENDPOINT//${BASH_REMATCH[0]}/$ARG}
done;
done
Expand Down
6 changes: 3 additions & 3 deletions helpers/apiCall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function apiCall {
do
case "${opt}" in
X)
METHOD=${OPTARG}
METHOD=${OPTARG}
;;
d)
PAYLOAD=${OPTARG}
Expand Down Expand Up @@ -57,10 +57,10 @@ function apiCall {
debug "Applying $opt with $ARG"
# PAYLOAD=${PAYLOAD//\$\{${opt}\}/$OPTARG}
# ENDPOINT=${ENDPOINT//\$\{${opt}\}/$OPTARG}
while [[ $PAYLOAD =~ \${$opt\??} ]] ; do
while [[ $PAYLOAD =~ \$\{$opt\??\} ]] ; do
PAYLOAD=${PAYLOAD//${BASH_REMATCH[0]}/$OPTARG}
done;
while [[ $ENDPOINT =~ \${$opt\??} ]] ; do
while [[ $ENDPOINT =~ \$\{$opt\??\} ]] ; do
ENDPOINT=${ENDPOINT//${BASH_REMATCH[0]}/$ARG}
done;
done
Expand Down

0 comments on commit bf89de7

Please sign in to comment.