# HG changeset patch # User Pascal Bellard # Date 1349954541 -7200 # Node ID 3d61397d3367d05993715db3ceac975ed63ba6be # Parent d2d8931bb1831ad26ee855b226315e3ced65a430 mirror-search.sh: add version in links diff -r d2d8931bb183 -r 3d61397d3367 pkgs/mirror-search.sh --- a/pkgs/mirror-search.sh Sat Sep 29 11:26:56 2012 +0200 +++ b/pkgs/mirror-search.sh Thu Oct 11 13:22:21 2012 +0200 @@ -280,7 +280,7 @@ PACKAGE_HREF="$PACKAGE" cat << _EOT_ $PACKAGE_HREF $(installed_size $PACKAGE): $SHORT_DESC \ -$(gettext "Receipt") +$(gettext "Receipt") _EOT_ fi [ -n "$(GET debug)" ] && cat << _EOT_ @@ -432,52 +432,60 @@ # Create some clickable links urllink() { + local tarball_url sedit="" [ -n "$WEB_SITE" ] && sedit="$sedit -e 's|^WEB_SITE=\"\\(.*\\)\"|WEB_SITE=\"\\1\"|'" [ -n "$WGET_URL" ] && sedit="$sedit -e 's|^WGET_URL=\"\\(.*\\)\"|WGET_URL=\"\\1\"|'" - [ -n "$CATEGORY" ] && sedit="$sedit -e 's|^CATEGORY=\"\\(.*\\)\"|CATEGORY=\"\\1\"|'" - [ -n "$WANTED" ] && sedit="$sedit -e 's|^WANTED=\"\\(.*\\)\"|WANTED=\"\\1\"|'" - [ -n "$BUGS" ] && sedit="$sedit -e 's|^BUGS=\"\\(.*\\)\"|BUGS=\"\\1\"|'" - [ -f $WOK/$PACKAGE/description.txt ] && sedit="$sedit -e 's|^SHORT_DESC=\"\\(.*\\)\"|SHORT_DESC=\"\\1\"|'" + [ -n "$CATEGORY" ] && sedit="$sedit -e 's|^CATEGORY=\"\\(.*\\)\"|CATEGORY=\"\\1\"|'" + [ -n "$WANTED" ] && sedit="$sedit -e 's|^WANTED=\"\\(.*\\)\"|WANTED=\"\\1\"|'" + [ -n "$BUGS" ] && sedit="$sedit -e 's|^BUGS=\"\\(.*\\)\"|BUGS=\"\\1\"|'" + [ -f $WOK/$PACKAGE/description.txt ] && sedit="$sedit -e 's|^SHORT_DESC=\"\\(.*\\)\"|SHORT_DESC=\"\\1\"|'" + tarball_url=sources/packages-$SLITAZ_VERSION/${TARBALL:0:1}/$TARBALL + [ -f /var/www/slitaz/mirror/$tarball_url ] || case "$tarball_url" in + *.gz) tarball_url=${tarball_url%gz}lzma ;; + *.tgz) tarball_url=${tarball_url%tgz}tar.lzma ;; + *.bz2) tarball_url=${tarball_url%bz2}lzma ;; + esac + [ -f /var/www/slitaz/mirror/$tarball_url ] && sedit="$sedit -e 's|^TARBALL=\"\\(.*\\)\"|TARBALL=\"\\1\"|'" if [ -n "$HOST_ARCH" ]; then tmp="" for i in $HOST_ARCH ; do - tmp="$tmp $i" + tmp="$tmp $i" done sedit="$sedit -e 's|^HOST_ARCH=\".*\"|HOST_ARCH=\"${tmp# }\"|'" fi if [ -n "$TAGS" ]; then tmp="" for i in $TAGS ; do - tmp="$tmp $i" + tmp="$tmp $i" done sedit="$sedit -e 's|^TAGS=\".*\"|TAGS=\"${tmp# }\"|'" fi if [ -n "$DEPENDS$BUILD_DEPENDS$SUGGESTED" ]; then for i in $(echo $DEPENDS $BUILD_DEPENDS $SUGGESTED) ; do - sedit="$sedit -e 's|\\([\" ]\\)$i\\([\" \\]\\)|\\1$i\\2|'" - sedit="$sedit -e 's|\\([\" ]\\)$i\$|\\1$i|'" - sedit="$sedit -e 's|^$i\\([\" \\]\\)|$i\\1|'" - sedit="$sedit -e 's|^$i\$|$i|'" + sedit="$sedit -e 's|\\([\" ]\\)$i\\([\" \\]\\)|\\1$i\\2|'" + sedit="$sedit -e 's|\\([\" ]\\)$i\$|\\1$i|'" + sedit="$sedit -e 's|^$i\\([\" \\]\\)|$i\\1|'" + sedit="$sedit -e 's|^$i\$|$i|'" done fi if [ -n "$CONFIG_FILES" ]; then tmp="" for i in $(echo $CONFIG_FILES) ; do - tmp="$tmp $i" + tmp="$tmp $i" done sedit="$sedit -e 's|^CONFIG_FILES=\".*\"|CONFIG_FILES=\"${tmp# }\"|'" fi if [ -n "$PROVIDE" ]; then tmp="" for i in $(echo $PROVIDE) ; do - tmp="$tmp $i" + tmp="$tmp $i" done sedit="$sedit -e 's|^PROVIDE=\".*\"|PROVIDE=\"${tmp# }\"|'" fi eval sed $sedit \ -e "'s|^MAINTAINER=\".*\"|MAINTAINER=\"$MAINTAINER\"|'" \ - -e "'s|^genpkg_rules|&|'" + -e "'s|^genpkg_rules|&|'" } display_packages_and_files()