Browse Source

sde-download: fixed '.' handling in .sde/settings

user/amery/wip/mount
Alejandro Mery 14 years ago
parent
commit
21b9c894b4
2 changed files with 10 additions and 7 deletions
  1. +5
    -4
      bin/sde-download
  2. +5
    -3
      lib/sde-download/mirror-test.sh

+ 5
- 4
bin/sde-download

@ -60,6 +60,7 @@ mkdir -p tmp/ download/
# determine version of the package tree
pkgver=$("$SDEROOT/lib/version.sh" -p)
xpkgver=$(echo "$pkgver" | tr '.' '_')
# Load system wide configuration for this tool
#
@ -67,7 +68,7 @@ config=default mirror= mirror_last= altdir= proxy= proxyauth= notimeout=0
if [ -s "$SDESETTINGS" ]; then
eval $( $SDEROOT/bin/sde-config-ini -F "$SDESETTINGS" download )
eval $( $SDEROOT/bin/sde-config-ini -F "$SDESETTINGS" download-$pkgver )
eval $( $SDEROOT/bin/sde-config-ini -F "$SDESETTINGS" download-$xpkgver )
fi
this_is_the_2nd_run=0
@ -118,8 +119,8 @@ while [ $# -gt 0 ]; do
mirror="$2"
mirror_last=$(date +%s)
$SDEROOT/bin/sde-config-ini -F "$SDESETTINGS" \
"download-$pkgver.mirror=$mirror" \
"download-$pkgver.mirror_last=$mirror_last"
"download-$xpkgver.mirror=$mirror" \
"download-$xpkgver.mirror_last=$mirror_last"
fi
shift ;;
@ -221,7 +222,7 @@ detect_mirror() {
# read new mirror info
mirror=
eval $( $SDEROOT/bin/sde-config-ini -F "$SDESETTINGS" download-$pkgver )
eval $( $SDEROOT/bin/sde-config-ini -F "$SDESETTINGS" download-$xpkgver )
if [ -z "$mirror" ]; then
echo_error "Mirror detection loop hit a bug!"

+ 5
- 3
lib/sde-download/mirror-test.sh

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/sde-download/mirror-test.sh
# Copyright (C) 2006 - 2008 The OpenSDE Project
# Copyright (C) 2006 - 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -73,6 +73,8 @@ IFS="$OLDIFS"
[ -n "$mirror" ] || mirror=broken
xpkgver=$("$SDEROOT/lib/version.sh" -p | tr '.' '_')
exec "$SDEROOT/bin/sde-config-ini" -F "$SDESETTINGS" \
"download-$sdever.mirror=$mirror" \
"download-$sdever.mirror_last=$(date +%s)"
"download-$xpkgver.mirror=$mirror" \
"download-$xpkgver.mirror_last=$(date +%s)"

Loading…
Cancel
Save