Browse Source

sde-check-package: added magic to handle sourceforge

karasz/new-early
Alejandro Mery 16 years ago
parent
commit
8643ccccfd
2 changed files with 13 additions and 1 deletions
  1. +12
    -0
      bin/sde-check-package
  2. +1
    -1
      etc/check_package.sed

+ 12
- 0
bin/sde-check-package

@ -146,6 +146,18 @@ check_package() {
"$SDEROOT/lib/sde-download/dump-tokenized.sh" "$url" > "$dump" 2> "$dump.stderr"
unlock "$dump"
;;
sourceforge)
lock "$dump"
url="http://prdownloads.sourceforge.net/sourceforge/${url#sourceforge://}"
if [ ! -e "$dump" ]; then
"$SDEROOT/lib/sde-download/dump.sh" "$url" 2> "$dump.stderr" | grep "showfiles.php.*release_id" |
sed -e 's,.*"\([^"]\+\)".*,http://sourceforge.net\1,' -e 's,&,\&,g' | sort -u |
while read x; do
"$SDEROOT/lib/sde-download/dump-tokenized.sh" "$x"
done > "$dump" 2>> "$dump.stderr"
fi
unlock "$dump"
;;
*)
echo_warning "$pkg: $protocol not supported."
continue

+ 1
- 1
etc/check_package.sed

@ -14,4 +14,4 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
s,^http://\(.*\.\)\?dl\.\(sourceforge\|sf\)\.net/,http://prdownloads.sourceforge.net/,
s,^http://\(.*\.\)\?dl\.\(sourceforge\|sf\)\.net/\(sourceforge/\)\?,sourceforge://,

Loading…
Cancel
Save