Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
hwdsl2 committed Oct 30, 2017
1 parent bd8ea10 commit 6ef28c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -18,7 +18,7 @@ env:
- TESTID=with-env

script:
- export SHELLCHECK_OPTS="-e SC1090,SC1091"
- export SHELLCHECK_OPTS="-e SC1090,SC1091,SC1117"
- shellcheck *.sh
- sudo sed -i "/debian unstable/d" /etc/apt/sources.list
- docker build -t vpn .
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Expand Up @@ -24,7 +24,7 @@ nospaces() { printf %s "$1" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//';
noquotes() { printf %s "$1" | sed -e 's/^"\(.*\)"$/\1/' -e "s/^'\(.*\)'$/\1/"; }

check_ip() {
IP_REGEX="^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
IP_REGEX='^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
printf %s "$1" | tr -d '\n' | grep -Eq "$IP_REGEX"
}

Expand Down

0 comments on commit 6ef28c6

Please sign in to comment.