3 # --- T2-COPYRIGHT-BEGIN ---
5 # Copyright (C) 2004 - 2025 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 # SPDX-License-Identifier: GPL-2.0
8 # --- T2-COPYRIGHT-END ---
10 # Run this command from the T2 directory as scripts/Download [ options ]
12 # It enables you to download source files as described in the package
13 # definitions (optionally using a mirroring 'cache' server).
15 # This script also allows for checksum display/validation.
19 .
scripts
/functions.
in
20 . misc
/output
/parse-config
22 eval "$(egrep '^(sdever)=' scripts/parse-config)"
25 if [ "$1" = '--help' ]; then
29 echo " scripts/Download [options] [ Package(s) ]"
30 echo " scripts/Download [options] [ Desc file(s) ]"
31 echo " scripts/Download [options] -repository Repositories"
32 echo " scripts/Download [options] { -all | -required }"
34 echo " Where [options] is an alias for:"
35 echo " [ -cfg <config> ] [ -nock ] [ -alt-dir <AlternativeDirectory> ]"
36 echo " [ -mirror <URL> | -check ] [ -try-questionable ] [ -notimeout ]"
37 echo " [ -longtimeout ] [ -curl-opt <curl-option>[:<curl-option>[:..]] ]"
38 echo " [ -proxy <server>[:<port>] ] [ -proxy-auth <username>[:<password>] ]"
39 echo " [ -copy ] [ -move ]"
41 echo " On default, this script auto-detects the best T2 SDE mirror."
43 echo " Mirrors can also be a local directories in the form of: 'file:///<dir>'"
45 echo " scripts/Download -mk-cksum Filename(s)"
46 echo " scripts/Download [ -list | -list-unknown | -list-missing | -list-cksums ]"
51 # -mk-cksum mode (display T2 type package checksum): it
52 # displays the checksum T2 validates against.
54 # Commonly known compressed tarballs unpacked.
56 if [ "$1" = -mk-cksum ]; then
63 if ! type -p $cksum > /dev
/null
; then
64 cksum=${cksum#sha} cksum=${cksum%sum}
65 cksum="shasum -a $cksum"
68 compressor
="$(get_compressor "$x")"
69 if [ ! -f "$x" ]; then
71 elif [ "$compressor" ]; then
72 $compressor < "$x" |
$cksum | cut
-f1 -d' '
74 $cksum < "$x" | cut
-f1 -d' '
80 # Handle options passed on the command line
82 mkdir
-p src
/ download
/; config
=default
84 mirror
='' checkonly
=0 altdir
=''
85 tryques
=0 nocheck
=0 options
='-this_is_the_2nd_run '
86 notimeout
=0 curl_options
='-A T2-downloader --disable-epsv --location -f'
87 altcopy
=link verbose
=1 quietmirror
=0
90 # load options from the enviroment T2DOWNOPT
91 # and then clean it to avoid duplication on children processes
93 set -- $T2DOWNOPT "$@"
97 while [ $# -gt 0 ]; do
100 this_is_the_2nd_run
=1
104 options
="$options -cfg $2"
105 config
="$2"; shift ;;
108 options
="$options -q"
112 # -nock skips checksum checking (don't use lightly)
113 options
="$options -nock"
117 # -mirror uses a mirror for finding source files
118 if [ "$2" = auto
]; then
119 rm -f download
/Mirror-Cache
122 echo "$2 $sdever" > download
/Mirror-Cache
123 options
="$options -mirror $2"
132 # -check just validates the file using the checksum
133 options
="$options -check"
137 # don't add timeout curl options
138 options
="$options -notimeout"
142 # don't add timeout curl options
143 options
="$options -longtimeout"
147 # additional curl options
148 options
="$options -curl-opt $2"
149 curl_options
="$curl_options `echo $2 | tr : ' '`"
153 # proxy option for curl
155 echo -n "$2" > download
/Proxy
156 options
="$options -proxy $2"
160 # proxy authentication for curl - can be seen with ps!
162 echo -n "$2" > download
/Proxy-auth
163 chmod 600 download
/Proxy-auth
164 options
="$options -proxy-auth $2"
168 # check for an alternative directory where to search for
169 # package source tarballs
170 altdir
=$
(cd $2; pwd -P)
171 options
="$options -alt-dir $2"
175 # also try to download questionable URLs
176 options
="$options -try-questionable"
179 -move) altcopy
=move
;;
180 -copy) altcopy
=copy
;;
187 # Read some config values
189 target
=`grep '^export SDECFG_TARGET=' config/$config/config 2>/dev/null |
190 cut -f2 -d= | tr -d "'"`
191 arch
=`grep '^export SDECFG_ARCH=' config/$config/config 2>/dev/null |
192 cut -f2 -d= | tr -d "'"`
193 arch
="${arch:-none}" target
="${target:-none}"
196 if [ $notimeout -eq 0 ]; then
197 curl_options
="$curl_options -Y 10 -y 20 --connect-timeout 12"
198 elif [ $notimeout -eq 1 ]; then
199 curl_options
="$curl_options -Y 1 -y 60 --connect-timeout 60"
202 # Disable checking for certificates on https downloads
203 curl_options
="$curl_options -k"
205 # cksum_chk filename cksum origfile
207 # This function verifies the checksum. If it fails it renames the file
208 # to file.chksum-err and returns failure.
210 # It seams like the [ ] command has problems with comparing high numbers.
211 # That's why I'm using a text comparison here.
213 # Not doing anything if checksum is '0' or a text of 'X'.
217 [ $nocheck = 1 -o -z "${2//0/}" -o -z "${2//X/}" ] && return 0
219 # determine cksum type
221 if [ "$ck" != "$y" ]; then
223 else case "${#ck}" in
231 if ! type -p $cksum > /dev
/null
; then
232 cksum=${cksum#sha} cksum=${cksum%sum}
233 cksum="shasum -a $cksum"
236 local x
="`$cksum "$1" | cut -f1 -d' '`"
237 if [ "$x" != "$y" ]; then
238 # Add .cksum-err extension to filename:
239 echo "Cksum ERROR: $3.cksum-err ($x)"
240 mv "$3" "$3.cksum-err"; return 1
245 # output (multiline) message only if we are not in quiet mode
248 if [ "$verbose" == 1 ]; then
249 echo "$@" |
sed -e 's,^,INFO: ,'
253 # output (multiline) message always
256 echo "$@" |
sed -e 's,^,INFO: ,'
259 # Autodetect best Mirror and safe url in $mirror
263 if [ -f download
/Mirror-Cache
]; then
264 read mirror mirrorver
< download
/Mirror-Cache
265 mirror
=${mirror:-none}
266 if [ "$mirror" = "none" ]; then
267 [ "$quietmirror" != 1 ] &&
269 " "Found download/Mirror-Cache: none (using original download locations)"
271 elif [ "$mirrorver" != "$sdever" -a "$mirrorver" != "any" ]; then
272 echo_warn
"Cached mirror URL in download/Mirror-Cache is outdated."
274 [ "$quietmirror" != 1 ] && var_append info
"
275 " "Found cached mirror: $mirror"
279 echo_warn
"Auto-detecting best mirror:"
281 echo_warn
"Downloading mirror-list from: t2sde.org"
282 curl
-s -S $curl_options -o src
/Download-Mirror-List \
283 "https://t2sde.org/cgi-bin/t2-mirrors.cgi?$sdever"
285 bestval
=0 result
='No Mirror Found!'
286 me
=$
([ -s download
/Me
] && cat download
/Me
)
287 while read mirror_name
; do
288 if [ "${mirror_name#=}" != "$mirror_name" ]; then
289 mirror_name
="${mirror_name#= }"
290 mirror_name
="${mirror_name% =}"
293 case "$mirror_name" in ($me) continue ;; esac
295 echo -n "INFO: Testing <$mirror_name> ..."
296 val
="$(curl -s $curl_options -m 20 "${mirror_url%/}/DOWNTEST
" \
297 -w "ok
%{speed_download
}" -o /dev/null)"
298 if [ "$val" = "${val#ok }" -o "$val" = "ok 0.000" ]; then
301 xval
=`echo ${val#ok } | tr -d .,`; echo " $val B/s"
302 if [ "$xval" -gt "$bestval" ]; then
303 bestval
=$xval mirror
="${mirror_url%/}"
304 result
="Saving mirror $mirror (src/Mirror-Cache)"
309 done < src
/Download-Mirror-List
310 echo "$mirror $sdever" > download
/Mirror-Cache
314 # download_file local-filename download-location cksum repo pkg
316 # This function decides if download directly or from a mirror,
317 # validates checksum, etc.
318 # Calls download_file_now to do the actual download.
323 local gzfile
="$1" location
="$2" cksum="$3" repo
="$4" pkg
="$5"
324 # Make src directory for creating tar balls
326 # Remove optional '-' prefix from $location
327 [ "${location:0:1}" == '-' ] && location
="${location:1}"
329 lkfile
="src/down.lockfile.`echo $gzfile | tr / -`"
331 # Check if it's already there
333 [ -s "$gzfile" -a $checkonly != 1 ] && return 0
337 if [ -s "$lkfile" ]; then
338 echo "Found $lkfile -> skip download."
341 trap 'local ret=$?; rm -f "$lkfile"; return $ret' INT
344 # Check if we only like to test the cksum(s)
346 if [ $checkonly = 1 ]; then
347 if [ ! -f "$gzfile" ]; then
348 echo "File missing: $gzfile"
349 rm -f "$lkfile"; trap INT
; downloaderror
=1; return
351 if [ -z "${cksum##X*}" ]; then
352 echo "No checksum (ignore): $gzfile"
353 rm -f "$lkfile"; trap INT
; return
355 if [ "$cksum" = 0 ]; then
356 echo "No checksum (missing): $gzfile"
357 rm -f "$lkfile"; trap INT
; return
360 elif [ -s "$gzfile" ]; then
361 echo; echo "Already downloaded: $pkg:$gzfile"
364 [ "$info" ] && echo_info
"$info" && info
=
365 echo; echo "Downloading $pkg:$gzfile"
367 # Existing *.cksum-err
369 if [ -s "$gzfile.cksum-err" ]; then
370 # cksum-err file alread exists:
371 echo "ERROR: found: $gzfile.cksum-err"
372 echo "ERROR: That means that we downloaded the" \
373 "file already and it had an"
374 echo "ERROR: incorrect checksum. Remove the" \
375 "*.cksum-err file to force a"
376 echo "ERROR: new download of that file."
377 rm -f "$lkfile"; trap INT
; downloaderror
=1; return 1
380 # Existing *.extck-err
382 if [ -s "$gzfile.extck-err" ]; then
383 # extck-err file alread exists:
384 echo "ERROR: found: $gzfile.extck-err"
385 echo "ERROR: That means that we downloaded the" \
386 "file already and it's content"
387 echo "ERROR: did not match it's filename extension." \
388 "Remove the *.extck-err file"
389 echo "ERROR: to force a new download of that file."
390 rm -f "$lkfile"; trap INT
; downloaderror
=1; return 1
395 if [ "$location" != "${location#\?}" ]; then
396 if [ "$tryques" = 0 ]; then
397 echo "ERROR: URL is marked as questionable." \
398 "Not downloading this file."
399 rm -f "$lkfile"; trap INT
; return 1
401 echo "WARNING: URL is marked as questionable." \
402 "Downloading it anyways."
403 location
="${location#\?}"
407 # Make directory (if required)
409 if [ ! -d `dirname "$gzfile"` ]; then
410 mkdir
-p `dirname "$gzfile"`
413 # Alternative Directory
415 if [ "$altdir" ]; then
416 altfile
=$
(find $altdir/ -name `basename $gzfile` |
head -n 1)
421 if [ "$altfile" ]; then
423 echo "Found `basename $gzfile` as: $altfile"
424 if [ "$altcopy" = 'link' ]; then
425 cp -lv $altfile $gzfile
426 elif [ "$altcopy" = 'copy' ]; then
427 cp -v $altfile $gzfile
428 elif [ "$altcopy" = 'move' ]; then
429 mv -v $altfile $gzfile
434 read mirror mirrorver
< download
/Mirror-Cache
436 if [ -n "$mirror" -a "$mirror" != "none" -a -z "${gzfile##download/mirror/*}" ]; then
438 if ! download_file_now
"!$mirror/${gzfile#download/mirror/}" $gzfile; then
439 echo "INFO: Download from mirror failed, trying original URL."
440 download_file_now
"$location" $gzfile || downloaderror
=1
443 # don't want to use mirror
444 download_file_now
"$location" $gzfile || downloaderror
=1
448 if [ ! -s "$gzfile" ]; then
449 rm -f "$lkfile"; trap INT
; return 1
454 if [[ $gzfile = *.gpg
]]; then
455 gzfile
=${gzfile%.gpg}
456 if [ -f $gzfile.gpg
]; then
457 echo "Unsigning GnuPG file: $gzfile.gpg"
460 if [ ! -f $gzfile ]; then
461 echo "Unsigning failed"
462 rm -f "$lkfile"; trap INT
; return 1
466 echo "Checksum testing: $gzfile"
467 local compressor
="$(get_compressor "$gzfile")"
468 if [ "$compressor" ]; then
469 # TODO: w/o temp file
470 $compressor < "$gzfile" > src
/down.$$.dat
471 cksum_chk src
/down.$$.dat
$cksum "$gzfile" || downloaderror
=1
472 rm -f src
/down.$$.dat
474 cksum_chk
"$gzfile" $cksum "$gzfile" || downloaderror
=1
477 # Free Lock and finish
479 rm -f "$lkfile"; trap INT
; return 0
482 # download_file_now location filename
484 # This function executes the actual download using curl.
486 download_file_now
() {
487 local location
="$1" gzfile
="$2" curlret
=0
492 manual
://*) url
="$location" ;;
493 !*) url
="${location#!}" ;;
494 *) url
="${location%/*}/${gzfile##*/}" ;;
501 # Determine if the file has already been downloaded
502 # manually. For this we first look in $HOME then in
504 downloadpath
=${altdir:-$HOME}
505 downloadfile
="${gzfile##*/}"
506 if [ -e $downloadpath/$downloadfile ]; then
507 location
="file://$downloadpath/"
509 location
="http://${url#manual://}"
510 # No manual download has taken place yet.
511 # So inform the user to do so.
513 The file $downloadfile can not be fetched automatically
514 please visit: $location
515 and download it manually into $HOME or somewhere else using -alt-dir
520 # Re-use this function with a modified download location.
521 download_file_now
"$location" $gzfile
524 http
://*|https
://*|
ftp://*|
file://*)
525 if [ -s "$gzfile.incomplete" ]; then
526 echo "INFO: Trying to resume previous download .."
532 [ -s download
/Translations
] && trfile
=download
/Translations || trfile
=misc
/share
/DownloadTranslations
533 trurl
="$(echo "$url" | sed -f $trfile)"
534 if [ -n "$trurl" -a "$trurl" != "$url" ]; then
535 echo "INFO: URL translated."
540 curl
--progress-bar $resume $curl_options "$url" -o "$gzfile.incomplete"
544 [ $curlret -eq 33 -o $curlret -eq 36 ]; then
545 echo "INFO: Resuming download not possible. -> Overwriting old file."
546 rm -f "$gzfile.incomplete"
547 curl
--progress-bar $curl_options "$url" -o "$gzfile.incomplete"
551 if [ $curlret -ne 0 ]; then
554 echo "WARNING: Got only some of the file. A re-run of $0"
555 echo "WARNING: is required to complete the download." ;;
556 22) : ;; # 404 not found
558 echo -e '\rWARNING: CURL got a SIGINT' \
559 "(someone pressed Ctrl-C). A re-run of"
560 echo "WARNING: $0 is required to complete the download."; sleep 1 ;;
562 echo "$curlret $gzfile $url" \
563 >> src
/Download-Errors
564 echo -e "\rERROR: CURL Returned error: $curlret" ;;
567 elif [ ! -s "$gzfile.incomplete" ]; then
568 echo "0 $gzfile $url" >> src
/Download-Errors
569 echo "ERROR: CURL returned success but we have no data!"
576 typeexpr
="gzip compressed data" ;;
578 typeexpr
="bzip2 compressed data" ;;
580 typeexpr
="lzip compressed data" ;;
582 typeexpr
="LZMA compressed data" ;;
584 typeexpr
="Zstandard compressed data" ;;
586 typeexpr
="compress'd data" ;;
588 typeexpr
="Zip archive data" ;;
590 typeexpr
="Java archive data (JAR)" ;;
592 typeexpr
="tar archive" ;;
594 typeexpr
="[xX][zZ] compressed data" ;;
596 echo "WARNING: Unknown file extension: $gzfile"
599 case $
(file "$gzfile.incomplete") in
601 mv "$gzfile"{.incomplete
,}
604 echo "ERROR: File type does not match filename ($typeexpr)!"
605 mv "$gzfile"{.incomplete
,.extck-err
}
611 protocol
="${url%%://*}"
613 # we need to use $location - $url is already mangled above -ReneR
614 # $protocol://$url $options
615 url
="`echo "$location" | sed "s
,$protocol://\
([^
]*\
).
*,\
1,"`"
616 options
="`echo "$location" | cut -s -d' ' -f2-`"
620 # the first option is the module name
621 module
="${options%% *}"
622 options
="${options#* }"
623 cmdline
="cvs -z4 -Q -d $url co -P $options $module"
625 # sometimes cvs wants to read ~/.cvspass just for fun ..
628 svn|svn\
+*) # allow any svn+ other transport and strip the svn+ part off
629 url
="${protocol#svn+}://$url"
630 options
="${options## *}"
631 if [ "$options" == "" -o "${options:0:1}" == "-" ]; then
632 # the module is the last dir of $url,
633 # w/ or wo/ trailing slash (/)
635 module
="${module##*/}"
637 # the first option is the module name
638 module
="${options%% *}"
639 [ "$module" = "$options" ] &&
640 options
= || options
="${options#* }"
642 cmdline
="svn export $options $url $module"
644 git|git\
+*) # allow any git+ other transport and strip the git+ part off
645 url
="${protocol#git+}://$url"
648 cmdline
="git clone --recursive $git_options $url $module"
649 options
="${options#* }"
650 sub_recurse
="git submodule update --init --recursive"
651 [ -n $options ] && cmdpp
="(cd $module; git checkout $options; $sub_recurse)"
653 hg|hg\
+*) # allow any hg+ other transport and strip the hg+ part off
654 url
="${protocol#hg+}://$url"
657 cmdline
="hg clone $url $module"
658 options
="${options#* }"
659 [ -n $options ] && cmdpp
="(cd $module; hg clone $options)"
662 echo "$cmdclient unrecognized!"
667 cvsdir
="src/down.${protocol}dir.`echo $gzfile | tr / -`"
668 saved_pwd
=$PWD; mkdir
-p $cvsdir; cd $cvsdir
672 $cmdline ||
touch .cvs_error
675 while fuser .cvs_output
&> /dev
/null
; do
676 echo -ne `nice du -sh 2> /dev/null | \
677 cut -f1` 'downloaded from archive so far ... \r'
681 if [ -f .cvs_error
]; then
682 cd $saved_pwd; rm -rf $cvsdir
683 echo -e "\nError during checkout."
687 echo `du -sh 2> /dev/null | cut -f1` 'downloaded from archive (download finished).'
689 if [ `echo * | wc -w` -gt 1 ]; then
690 # multi-module module
691 echo "Multi-module package detected, relocating ..."
694 [ "$x" != "t2-module.$$" ] && mv -f $x t2-module.$$
/
697 mv -f t2-module.$$
/* "$module"
702 tarname
="`basename $gzfile`"
703 echo "Preparing files for final tarball."
704 [ -n "$cmdpp" ] && eval "$cmdpp"
706 if [ `find -type f | wc -l` -gt 4 ]; then
707 local compressor
="$(get_compressor $tarname)"
708 # explicitly stable sort files
709 find $module | LANG
=C
sort |
710 egrep -v -e '/(CVS|.svn|.git|.hg)$' -e '/(CVS|.svn|.git|.hg)/' |
711 TZ
=UTC
tar -c --owner root
--group root
--mtime 20000101 \
712 --no-recursion --files-from=- |
${compressor/ -d/} > $tarname
713 mv $tarname $saved_pwd/$gzfile
715 echo "Too few files - assuming checkout failure."
719 cd $saved_pwd; rm -rf $cvsdir
727 grep -aH '^\[D\] ' package
/*/*/*.desc
728 grep -aH '^\[D\] ' {architecture
,target
}/*/package
/*/*.desc
729 grep -aH '^[X0-9a-z]' target
/*/download.txt
2> /dev
/null |
737 # we know we only have single spaces due to list_dtags' column_clean
738 list_dtags |
sed -n \
739 -e 's,[^ ]* \([X0-9a-z]*\) \(.\)\([^ ]*\) -.*,\1 download/local/\2/\2\3,p' \
740 -e 's,[^ ]* \([X0-9a-z]*\) \(.\)\([^ ]*\) [^-].*,\1 download/mirror/\2/\2\3,p'
747 list_cksums | cut
-f2- -d' '
753 mkdir
-p src
/; list
> src
/down.$$.lst
754 ls download
/{Proxy
,Proxy-auth
,Me
,Mirror-Cache
} \
755 download
/mirror
/{README
,DOWNTEST
,LAST-UPDATE
} \
756 >> src
/down.$$.lst
2> /dev
/null
757 find download
/* -type f
-o -type l
2> /dev
/null |
759 grep -qx "$fn" src
/down.$$.lst ||
echo "Unknown file: $fn"
761 rm -f src
/down.$$.lst
769 [ -f "$fn" ] ||
echo "$fn"
776 packages
`echo package/$repository/*/*.desc`
781 # Choosen config must exist
783 if [ ! -f config
/$config/packages
]; then
784 echo "ERROR: Config $config doesn't exist."
785 echo "ERROR: try scripts/Config -cfg $config first."
789 while read on a b repo pkg c
; do
791 done < <(grep '^X' config
/$config/packages
)
793 targetchain
="$target" x
="$target"
794 while [ -f "target/$x/extends" ]; do
795 x
="$(< target/$x/extends)"
796 targetchain
="$targetchain $x"
799 for target
in $targetchain; do
800 if [ -f target
/$target/download.txt
]; then
801 while read cksum file url
; do
802 download_file
"`source_file cksum $file "$url"`" "$url" "$cksum" "$target"
803 done < target
/$target/download.txt
810 list_dtags | cut
-d ' ' -f 2- |
while read cksum file url
; do
811 download_file
"`source_file cksum $file "$url"`" "$url" "$cksum"
818 detect_confdir
# relies on $pkg being set
819 if [ ! "$confdir" ]; then
820 echo "Error: Package $pkg not found!"
824 parse_desc
$pkg # relies on $pkg and $confdir being set
825 while read cksum file url
; do
826 download_file
"`source_file cksum $file "$url"`" "$url" "$cksum" "$repo" "$pkg"
827 done < <(echo "$desc_D")
835 if [ ! -f $arg ]; then
836 echo "Skipping \"$arg\" (not found)!"
840 target
="`echo $arg | cut -f2 -d/`"
842 while read cksum file url
; do
843 download_file
"`source_file cksum $file "$url"`" "$url" "$cksum" "$target"
847 if [ "${arg%.desc}" != "$arg" ]; then
848 arg
="`echo $arg | cut -f3 -d/`"; fi
854 # pkg_*_{pre,post}.conf is only activated if extender
855 # is enabled on $config/packages, so we will only
856 # download files of those extenders
858 for extender
in `ls -1 package/*/*/pkg_${arg}_{pre,post}.conf 2> /dev/null |
859 cut -d/ -f3 | sort -u`; do
860 if grep -q "^X .* $extender " \
861 config
/$config/packages
; then
862 echo_info
"Also downloading $extender ..."
872 # Things to do only for downloading
874 if [ "${1:0:5}" != "-list" -a $checkonly = 0 ]; then
875 # Set proxy information
876 if [ -f download
/Proxy
]; then
877 proxy
="$(< download/Proxy)"
878 if [ "$proxy" ]; then
879 curl_options
="$curl_options --proxy $proxy"
881 echo "INFO: No proxy information, removing: download/Proxy"
885 if [ -f download
/Proxy-auth
]; then
886 proxyauth
="$(< download/Proxy-auth)"
887 if [ "$proxyauth" ]; then
888 curl_options
="$curl_options --proxy-user $proxyauth"
889 git_options
="-c http.proxy=http://$proxyauth@$proxy"
891 echo "INFO: No proxy-auth information, removing: download/Proxy-auth"
892 rm download
/Proxy-auth
897 if [ -z "`type -p curl`" ]; then
898 echo "ERROR: we need \`curl\` installed and available in \$PATH to proceed."
902 # Thing to do only once
904 if [ $this_is_the_2nd_run = 0 ]; then
905 # am i using a proxy?
906 if [ "$proxy" ]; then
907 echo "INFO: Setting proxy to: $proxy"
909 if [ "$proxyauth" ]; then
910 echo "INFO: Setting proxy authentication information."
913 # do mirror detection
920 -list-unknown) list_unknown
;;
921 -list-missing) list_missing
;;
922 -list-cksums) list_cksums
;;
924 -required) required
;;
927 -repository) shift; repository
"$@" ;;
929 -*|
"") exec $0 --help ;;