Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 135a136,154
- > # url encode a string
- > url_encode() {
- > [ $# -lt 1 ] && { return; }
- >
- > encodedurl="$1";
- >
- > # make sure hexdump exists, if not, just give back the url
- > [ ! -x "/usr/bin/hexdump" ] && { return; }
- >
- > encodedurl=`
- > echo $encodedurl | hexdump -v -e '1/1 "%02x\t"' -e '1/1 "%_c\n"' |
- > LANG=C awk '
- > $1 == "20" { printf("%s", "+"); next } # space becomes plus
- > $1 ~ /0[adAD]/ { next } # strip newlines
- > $2 ~ /^[a-zA-Z0-9.*()\/-]$/ { printf("%s", $2); next } # pass through what we can
- > { printf("%%%s", $1) } # take hex value of everything else
- > '`
- > }
- >
- 585c604,605
- < read -r Name Version URLPath < <(wget -q -O - "${aur_info}${name}" | grep -Fv -- "\"No result found\"" | sed -e 's/.*"Name":"\([^"]*\)".*"Version":"\([^"]*\)".*"URLPath":"\([^"]*\)".*/ \2 \3/g')
- ---
- > url_encode "${name}"
- > read -r Name Version URLPath < <(wget -q -O - "${aur_info}${encodedurl}" | grep -Fv -- "\"No result found\"" | sed -e 's/.*"Name":"\([^"]*\)".*"Version":"\([^"]*\)".*"URLPath":"\([^"]*\)".*/ \2 \3/g')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement