:# getrpr.bat: download the MiKTeX package repository :# :# Copyright (C) 2001-2003 MiKTeX.org :# :# This file 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; either version 2, or (at your :# option) any later version. :# :# This file is distributed in the hope that it will be useful, but :# WITHOUT ANY WARRANTY; without even the implied warranty of :# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU :# General Public License for more details. :# :# You should have received a copy of the GNU General Public License :# along with this file; if not, write to the Free Software :# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, :# USA. @echo off if "%1" == "" goto usage if "%2" == "" goto usage if "%3" == "" goto usage if "%2" == "small" goto start if "%2" == "large" goto start if "%2" == "total" goto start echo "%2" is not a package set. You should choose echo one of: "small", "large", "total". goto end :start echo getrpr 2.1.2 (C) Copyright 2001-2003 MiKTeX.org echo This script will download the "%2" MiKTeX package repository echo from (remote): %1 echo to (local): %3 pause if not exist %3\nul mkdir %3 if exist %3\nul goto download echo Cannot create directory %3. goto end :download wget %1/%2.html --directory-prefix=%3 %4 %5 %6 %7 %8 %9 if errorlevel 1 goto error wget --force-html --base=%1/ --input-file=%3\%2.html --directory-prefix=%3 %4 %5 %6 %7 %8 %9 if errorlevel 1 goto error goto end :error echo Something went wrong. goto end :usage echo Usage: getrpr REMOTEREPOSITORY PACKAGESET LOCALREPOSITORY [WGETOPTION]... echo e.g getrpr http://www.tex.ac.uk/tex-archive/systems/win32/miktex/tm/packages total C:\TEMP echo Say 'wget --help' to see valid wget options. goto end :end