Browse Source

* improved bin/sde-download2 to support multi-argument download locations and to actually

inject the file in download/



git-svn-id: svn://svn.opensde.net/opensde/opensde/trunk@21865 10447126-35f2-4685-b0cf-6dd780d3921f
misl/sde-wrapper
Alejandro Mery 17 years ago
parent
commit
9bbab8f5f9
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      bin/sde-download2

+ 14
- 2
bin/sde-download2

@ -162,16 +162,28 @@ esac | while read pkg cksum file location; do
tmpfile="$SDEROOT/tmp/down.$( echo $file | tr '/' '-' )"
# debug output
[ $verbose -le 1 ] || echo_info "pkg:$pkg file:$file ($cksum) $location"
if [ -s "$SDEROOT/$file" ]; then
:
elif [ -e "$tmpfile.lock" ]; then
echo_warning "$file: skipping."
else
"$SDEROOT"/bin/sde-download-get $downloadgetopt -- "$tmpfile" "$location"
if [ $verbose -le 0 ]; then
:
elif [ $verbose -le 1 ]; then
echo_info "Downloading $pkg:$file"
else
echo_info "Downloading $pkg:$file ($cksum) $location"
fi
"$SDEROOT"/bin/sde-download-get $downloadgetopt -- "$tmpfile" $location
if [ $? -ne 0 ]; then
echo_warning "$file: failed to download"
rm -f "$tmpfile"
else
mkdir -p "${file%/*}"
mv "${tmpfile}" "$file"
fi
fi
done

Loading…
Cancel
Save