mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
Downloads: implement proper URL hex substitution.
Remove the old code for replacing hex codes in URLs (like %2B for '+') and add a generic code replacing any %xy sequence with the proper character. Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
This commit is contained in:
parent
102d89c316
commit
459c36864a
@ -1760,8 +1760,12 @@ build_package () {
|
||||
. $PKG.info.build
|
||||
PKGNAME=${PKG##*/}
|
||||
SRCNAME=${DOWNLOAD##*/}
|
||||
SRCNAME=$(echo $SRCNAME | sed -e 's/\%2B/\+/g') # TiMidity fix for '+'
|
||||
SRCNAME=$(echo $SRCNAME | sed -e 's/\%20/ /g') # Fix for spaces
|
||||
# Replace URL hex sequences (like %20 for ' ' and %2B for '+')
|
||||
SRCNAME=$(echo "echo $SRCNAME" \
|
||||
|sed "s/%\(..\)/\$(printf \"\\\\x\\1\")/g" |bash)
|
||||
# FIXME CLEANUP This is old stuff, and should be deleted
|
||||
# SRCNAME=$(echo $SRCNAME | sed -e 's/\%2B/\+/g') # TiMidity fix for '+'
|
||||
# SRCNAME=$(echo $SRCNAME | sed -e 's/\%20/ /g') # Fix for spaces
|
||||
if [ "$PKG" = "django" ]; then
|
||||
SRCNAME="Django-$VERSION.tar.gz"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user