-
Notifications
You must be signed in to change notification settings - Fork 0
/
duplicate-apt-repos
executable file
·50 lines (45 loc) · 2.23 KB
/
duplicate-apt-repos
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
42
43
44
45
46
47
48
49
#!/bin/sh
echo "Be careful. Edit this to make sure this isn't gonna break something."
exit 0
upstream='virtualmin-bionic
virtualmin-buster
virtualmin-jessie
virtualmin-stretch
virtualmin-trusty
virtualmin-xenial
'
for d in $upstream; do
# Delete the endpoint first
aptly publish drop $d filesystem:pro:
aptly publish drop $d filesystem:gpl:
# Mirror all existing aptly repos from software.virtualmin.com
aptly mirror drop $d-mirror
aptly mirror create $d-mirror http://software.virtualmin.com/vm/6/gpl/apt $d main
aptly mirror update $d-mirror
# Delete and create repcs
aptly repo drop $d
aptly repo create $d
# Import into local repos
aptly repo import $d-mirror $d 'Name'
# Publish
aptly -architectures="amd64,i386,all" publish repo -gpg-key="E36F06647D8EBD2BE3642BCED9F9010760D62A6B" -distribution="$d" $d filesystem:pro:
aptly -architectures="amd64,i386,all" publish repo -gpg-key="E36F06647D8EBD2BE3642BCED9F9010760D62A6B" -distribution="$d" $d filesystem:gpl:
done
# Universal repos
aptly publish drop virtualmin-universal filesystem:pro:
aptly publish drop virtualmin-universal filesystem:gpl:
aptly mirror drop virtualmin-universal-mirror
aptly mirror create virtualmin-universal-mirror http://5556176:[email protected]/vm/6/apt virtualmin-universal main
aptly mirror update virtualmin-universal-mirror
aptly repo drop virtualmin-universal
aptly repo create virtualmin-universal
aptly repo import virtualmin-universal-mirror virtualmin-universal 'Name'
aptly mirror drop virtualmin-gpl-universal-mirror
aptly mirror create virtualmin-gpl-universal-mirror http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main
aptly mirror update virtualmin-gpl-universal-mirror
aptly repo drop virtualmin-gpl-universal
aptly repo create virtualmin-gpl-universal
aptly repo import virtualmin-gpl-universal-mirror virtualmin-gpl-universal 'Name'
# Publish repos to the local filesystem
aptly -architectures="all" publish repo -gpg-key="E36F06647D8EBD2BE3642BCED9F9010760D62A6B" -distribution="virtualmin-universal" virtualmin-universal filesystem:pro:
aptly -architectures="all" publish repo -gpg-key="E36F06647D8EBD2BE3642BCED9F9010760D62A6B" -distribution="virtualmin-universal" virtualmin-gpl-universal filesystem:gpl: