added support for space when adding contact
This commit is contained in:
parent
46424c86ee
commit
d9f84b6808
@ -8,15 +8,22 @@ VALID_NUMBER=$(curl -s -b $COOKIE $BML_URL/validate/account/$ACCOUNT_NUMBER \
|
||||
if [ "$VALID_NUMBER" = "true" ]
|
||||
then
|
||||
|
||||
NAME=$(curl -s -b $COOKIE $BML_URL/validate/account/$ACCOUNT_NUMBER \
|
||||
ACCOUNT_NAME=$(curl -s -b $COOKIE $BML_URL/validate/account/$ACCOUNT_NUMBER \
|
||||
| jq -r '.["payload"] | .name')
|
||||
CURRENCY=$(curl -s -b $COOKIE $BML_URL/validate/account/$ACCOUNT_NUMBER \
|
||||
| jq -r '.["payload"] | .currency')
|
||||
echo "Account Name: $NAME"
|
||||
echo "Account Name: $ACCOUNT_NAME"
|
||||
echo "Currency: $CURRENCY"
|
||||
echo ""
|
||||
printf 'Contact Name: '
|
||||
read -r CONTACT_NAME
|
||||
if [ "$CONTACT_NAME" = "" ]
|
||||
then
|
||||
CONTACT_NAME=$ACCOUNT_NAME
|
||||
else
|
||||
:
|
||||
fi
|
||||
CONTACT_NAME=`echo "$CONTACT_NAME" | sed "s/ /%20/"`
|
||||
ADDCONTACT=$(curl -s -b $COOKIE $BML_URL/contacts \
|
||||
--data-raw contact_type=IAT \
|
||||
--data-raw account=$ACCOUNT_NUMBER \
|
||||
|
0
install.sh
Normal file → Executable file
0
install.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user