mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-29 10:24:11 +01: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
1 changed files with 6 additions and 2 deletions
|
@ -1760,8 +1760,12 @@ build_package () {
|
||||||
. $PKG.info.build
|
. $PKG.info.build
|
||||||
PKGNAME=${PKG##*/}
|
PKGNAME=${PKG##*/}
|
||||||
SRCNAME=${DOWNLOAD##*/}
|
SRCNAME=${DOWNLOAD##*/}
|
||||||
SRCNAME=$(echo $SRCNAME | sed -e 's/\%2B/\+/g') # TiMidity fix for '+'
|
# Replace URL hex sequences (like %20 for ' ' and %2B for '+')
|
||||||
SRCNAME=$(echo $SRCNAME | sed -e 's/\%20/ /g') # Fix for spaces
|
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
|
if [ "$PKG" = "django" ]; then
|
||||||
SRCNAME="Django-$VERSION.tar.gz"
|
SRCNAME="Django-$VERSION.tar.gz"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue