From bef927cc3b0b4ad23ca29bb8a60fd8a36990f6b5 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 16 May 2017 09:26:54 +0400 Subject: [PATCH] =?UTF-8?q?umirror:=20ajouter=20les=20options=20-g=20et=20?= =?UTF-8?q?-n=20pour=20faciliter=20le=20t=C3=A9l=C3=A9chargement=20des=20l?= =?UTF-8?q?ivraisons=20APOGEE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- umirror | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/umirror b/umirror index 024374d..ecf923f 100755 --- a/umirror +++ b/umirror @@ -10,14 +10,23 @@ USAGE $scriptname [options] url [wget_options] OPTIONS - -l - Convertir les liens pour consultation locale" + -l, --local + Convertir les liens pour consultation locale + -g, --no-robots + Ne pas tenir compte du fichier robots.txt + -n, --no-index + Ne pas télécharger les fichiers de la forme 'index.html*'. Utile pour + faire un miroir d'un site ftp qui est servi en http." } local= +no_robots= +no_index= parse_opts + "${PRETTYOPTS[@]}" \ --help '$exit_with display_help' \ - -l local=1 \ + -l,--local local=1 \ + -g,--no-robots no_robots=1 \ + -n,--no-index no_index=1 \ @ args -- "$@" && set -- "${args[@]}" || die "$args" url="$1"; shift @@ -31,4 +40,6 @@ fi args=(-m -p -np) [ -n "$local" ] && args=("${args[@]}" -k -K) +[ -n "$no_robots" ] && args=("${args[@]}" -e robots=off) +[ -n "$no_index" ] && args=("${args[@]}" -R "index.html*") wget "${args[@]}" "$@" "$url"