File: mkdebmirror

package info (click to toggle)
fai 4.3.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,740 kB
  • sloc: perl: 5,115; sh: 4,272; makefile: 157
file content (41 lines) | stat: -rwxr-xr-x 1,411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh

# Thomas Lange, lange@informatik.uni-koeln.de, (c) 2001-2012

# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
update_from() {

    # update local mirror from a host
    host=$1
    shift
    defopt="--i18n --diff=none $allopt --host=$host --dist=$dist $sect"

    echo "------------------ create mirror for debian ------------------"
    debmirror $excl $destdir/debian $defopt $*
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# main program
#
# here you have to adjust the hostnames of the mirror and the names of the distributions

# excluding dbg_ packages saves a lot of disk space. About 33G for squeeze,wheezy in amd64,i386
excl=--exclude='-dbg_'

debug="$@"
arch=amd64
dist=jessie

destdir=/files/scratch/debmirror
sect="--section main,contrib,non-free"
allopt="$debug --state-cache-days=100 --ignore-missing-release --ignore-release-gpg --passive --nosource --arch=$arch"

# first sync from a mirror near to you
#update_from ftp.uni-koeln.de $*
# If this mirror isn't always up to date, sync again from an official mirror

# sync from an official mirror
update_from http.debian.net --getcontents $*

# even one should not mirror the security site, but I will do it.
echo "------------------ create mirror for debian-security ------------------"
debmirror $excl $destdir/debian-security $allopt --host=security.debian.org -r debian-security $sect -d jessie/updates $*