Skip to content

Commit

Permalink
update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Jul 26, 2016
1 parent 1a6fee6 commit e821df7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/aws.bash
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function updateInstanceName()

function getAllowedRegions()
{
echo 'ap-northeast-1 ap-northeast-2 ap-southeast-1 ap-southeast-2 eu-central-1 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2'
echo 'ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 eu-central-1 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2'
}

function getRegionFromRecordSetAliasTargetDNSName()
Expand Down
25 changes: 25 additions & 0 deletions libraries/util.bash
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,31 @@ function displayVersion()
info "${message}"
}

function encodeURL()
{
local -r url="${1}"

local i=0
local walker=''

for ((i = 0; i < ${#url}; i++))
do
walker="${url:i:1}"

case "${walker}" in
[a-zA-Z0-9.~_-])
printf "${walker}"
;;
' ')
printf +
;;
*)
printf '%%%X' "'${walker}"
;;
esac
done
}

function error()
{
local -r message="${1}"
Expand Down

0 comments on commit e821df7

Please sign in to comment.