diff options
author | Colin Watson <cjwatson@debian.org> | 2019-07-07 12:44:48 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-07-07 12:56:27 +0100 |
commit | a96c529f2c33d6f9af7a053c49d278732e385860 (patch) | |
tree | 440203466ec88f24f52c646d27eadb11e31c6c69 /examples | |
parent | 3be83d8a4f89268baed8d889cdf569c7ac628511 (diff) |
make-local-mirror: Fetch .bz2/.xz as appropriate
.gz doesn't exist everywhere these days.
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/make-local-mirror | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/make-local-mirror b/examples/make-local-mirror index fc463b6..04557ce 100755 --- a/examples/make-local-mirror +++ b/examples/make-local-mirror @@ -95,14 +95,22 @@ for archive in $archives; do arches='arm64 armhf ppc64el s390x' ;; esac + case $archive:$suite in + ubuntu*:precise|ubuntu*:trusty) + ext='.bz2' + ;; + *) + ext='.xz' + ;; + esac for component in $components; do mkdir -p "$suitehere/$component" for arch in $arches; do mkdir -p "$suitehere/$component/binary-$arch" - wget $WGET_OPTS -O "$suitehere/$component/binary-$arch/Packages.gz" "$host/$root/$suite$suitesuffix/$component/binary-$arch/Packages.gz" + wget $WGET_OPTS -O "$suitehere/$component/binary-$arch/Packages$ext" "$host/$root/$suite$suitesuffix/$component/binary-$arch/Packages$ext" done mkdir -p "$suite/$component/source" - wget $WGET_OPTS -O "$suite/$component/source/Sources.gz" "$host/$root/$suite$suitesuffix/$component/source/Sources.gz" + wget $WGET_OPTS -O "$suite/$component/source/Sources$ext" "$host/$root/$suite$suitesuffix/$component/source/Sources$ext" done done done |