Browse Source

sde-download: split get-tokenized.sh into dump.sh and dump-tokenized.sh

karasz/new-early
Alejandro Mery 16 years ago
parent
commit
fe25a76c0a
3 changed files with 27 additions and 8 deletions
  1. +1
    -1
      bin/sde-check-package
  2. +23
    -0
      lib/sde-download/dump-tokenized.sh
  3. +3
    -7
      lib/sde-download/dump.sh

+ 1
- 1
bin/sde-check-package

@ -143,7 +143,7 @@ check_package() {
http|https|ftp)
lock "$dump"
[ -e "$dump" ] ||
"$SDEROOT/lib/sde-download/get-tokenized.sh" "$url" > "$dump" 2> "$dump.stderr"
"$SDEROOT/lib/sde-download/dump-tokenized.sh" "$url" > "$dump" 2> "$dump.stderr"
unlock "$dump"
;;
*)

+ 23
- 0
lib/sde-download/dump-tokenized.sh

@ -0,0 +1,23 @@
#!/bin/sh
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/sde-download/dump-tokenized.sh
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# returns mutilated but grep friendly content of a page
#
# (It will include many empty lines, but it doesn't worth to remove them
# here)
#
set -x
echo "${0%/*}/dump.sh" "$@" #| sed -e "s,[\r\t\"'<>= /],\n,g"

lib/sde-download/get-tokenized.sh → lib/sde-download/dump.sh

@ -2,7 +2,7 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/sde-download/get-tokenized.sh
# Filename: lib/sde-download/dump.sh
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
@ -13,11 +13,7 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# returns mutilated but grep friendly content of a page
#
# (It will include many empty lines, but it doesn't worth to remove them
# here)
#
# dumps the content of a page
curl_options="-s -L"
curl_options="$curl_options --disable-epsv"
@ -36,5 +32,5 @@ for x; do
echo "$x" >&2
curl $curl_options "$x"
errno="$?"
done < /dev/null | sed -e "s,[\r\t\"'<>= /],\n,g"
done < /dev/null
exit "${errno:-1}"

Loading…
Cancel
Save