Permalink
Browse files

syntax error in dns record change function. fixes #120

  • Loading branch information...
serghey-rodin committed Mar 5, 2014
1 parent d87f3f6 commit 04e252d75ce38033d0476df75593380e69391fbc
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/v-change-dns-record
View
@@ -54,7 +54,7 @@ if [ "$TYPE" != 'MX' ] && [ "$TYPE" != 'SRV' ]; then
fi
# Add trailing dot at the end of NS/CNAME/MX/PTR/SRV record
fqdn_type=$(echo $TYPE | grep "[NS|CNAME|MX|PTR|SRV]")
fqdn_type=$(echo $TYPE | grep "NS\|CNAME\|MX\|PTR\|SRV")
if [ ! -z "$fqdn_type" ]; then
trailing_dot=$(echo $dvalue | grep "\.$")
if [ -z $trailing_dot ]; then

2 comments on commit 04e252d

@ORiON-

This comment has been minimized.

Show comment
Hide comment
@ORiON-

ORiON- Mar 23, 2014

I was about commiting a fix, and than i saw that the 'master' has already got a fix for that.
Anyway, grep -E "NS|CNAME|MX|PTR|SRV" looks better.

But, why not make it look even better? (:
You can combine the 'grep' with the 'if' together like this:
if [[ $TYPE =~ NS|CNAME|MX|PTR|SRV ]]; then

ORiON- replied Mar 23, 2014

I was about commiting a fix, and than i saw that the 'master' has already got a fix for that.
Anyway, grep -E "NS|CNAME|MX|PTR|SRV" looks better.

But, why not make it look even better? (:
You can combine the 'grep' with the 'if' together like this:
if [[ $TYPE =~ NS|CNAME|MX|PTR|SRV ]]; then

@serghey-rodin

This comment has been minimized.

Show comment
Hide comment
@serghey-rodin

serghey-rodin Mar 23, 2014

Owner

Yeah, why not? Thank you :)
3587976

Owner

serghey-rodin replied Mar 23, 2014

Yeah, why not? Thank you :)
3587976

Please sign in to comment.