summaryrefslogtreecommitdiff
path: root/src/libimcv/plugins/imv_os/pacman.sh
blob: 621905edfdf14ac32ce2b82243debd3804606ef4 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#!/bin/sh

DIR="/etc/pts"
DATE=`date +%Y%m%d-%H%M`
UBUNTU="http://security.ubuntu.com/ubuntu/dists"
UBUNTU_VERSIONS="saucy raring quantal precise lucid"
UBUNTU_DIRS="main multiverse restricted universe"
UBUNTU_ARCH="binary-amd64 binary-i386"
DEBIAN="http://security.debian.org/dists"
DEBIAN_VERSIONS="jessie wheezy squeeze"
DEBIAN_DIRS="main contrib non-free"
DEBIAN_ARCH="binary-amd64 binary-i386"
PACMAN=/usr/libexec/ipsec/pacman
PACMAN_LOG="$DIR/$DATE-pacman.log"

cd $DIR/dists

for v in $UBUNTU_VERSIONS
do
  for a in $UBUNTU_ARCH
  do
    mkdir -p $v-security/$a $v-updates/$a
    for d in $UBUNTU_DIRS
    do
  	  wget $UBUNTU/$v-security/$d/$a/Packages.bz2 -O $v-security/$a/Packages-$d.bz2
      bunzip2 -f $v-security/$a/Packages-$d.bz2
  	  wget $UBUNTU/$v-updates/$d/$a/Packages.bz2  -O $v-updates/$a/Packages-$d.bz2
      bunzip2 -f $v-updates/$a/Packages-$d.bz2
	done
  done
done

for v in $DEBIAN_VERSIONS
do
  for a in $DEBIAN_ARCH
  do
    mkdir -p $v-updates/$a
    for d in $DEBIAN_DIRS
    do
  	  wget $DEBIAN/$v/updates/$d/$a/Packages.bz2  -O $v-updates/$a/Packages-$d.bz2
      bunzip2 -f $v-updates/$a/Packages-$d.bz2
	done
  done
done

for f in saucy-security/binary-amd64/*
do
  $PACMAN --product "Ubuntu 13.10 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in saucy-updates/binary-amd64/*
do
  $PACMAN --product "Ubuntu 13.10 x86_64" --file $f >> $PACMAN_LOG
done
echo
for f in saucy-security/binary-i386/*
do
  $PACMAN --product "Ubuntu 13.10 i686" --file $f --security >> $PACMAN_LOG
done
echo
for f in saucy-updates/binary-i386/*
do
  $PACMAN --product "Ubuntu 13.10 i686" --file $f >> $PACMAN_LOG
done
echo

for f in raring-security/binary-amd64/*
do
  $PACMAN --product "Ubuntu 13.04 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in raring-updates/binary-amd64/*
do
  $PACMAN --product "Ubuntu 13.04 x86_64" --file $f >> $PACMAN_LOG
done
echo
for f in raring-security/binary-i386/*
do
  $PACMAN --product "Ubuntu 13.04 i686" --file $f --security >> $PACMAN_LOG
done
echo
for f in raring-updates/binary-i386/*
do
  $PACMAN --product "Ubuntu 13.04 i686" --file $f >> $PACMAN_LOG
done
echo

for f in quantal-security/binary-amd64/*
do
  $PACMAN --product "Ubuntu 12.10 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in quantal-updates/binary-amd64/*
do
  $PACMAN --product "Ubuntu 12.10 x86_64" --file $f >> $PACMAN_LOG
done
echo
for f in quantal-security/binary-i386/*
do
  $PACMAN --product "Ubuntu 12.10 i686" --file $f --security >> $PACMAN_LOG
done
echo
for f in quantal-updates/binary-i386/*
do
  $PACMAN --product "Ubuntu 12.10 i686" --file $f >> $PACMAN_LOG
done
echo

for f in precise-security/binary-amd64/*
do
  $PACMAN --product "Ubuntu 12.04 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in precise-updates/binary-amd64/*
do
  $PACMAN --product "Ubuntu 12.04 x86_64" --file $f >> $PACMAN_LOG
done
echo
for f in precise-security/binary-i386/*
do
  $PACMAN --product "Ubuntu 12.04 i686" --file $f --security >> $PACMAN_LOG
done
echo
for f in precise-updates/binary-i386/*
do
  $PACMAN --product "Ubuntu 12.04 i686" --file $f >> $PACMAN_LOG
done
echo

for f in lucid-security/binary-amd64/*
do
  $PACMAN --product "Ubuntu 10.04 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in lucid-updates/binary-amd64/*
do
  $PACMAN --product "Ubuntu 10.04 x86_64" --file $f >> $PACMAN_LOG
done
echo
for f in lucid-security/binary-i386/*
do
  $PACMAN --product "Ubuntu 10.04 i686" --file $f --security >> $PACMAN_LOG
done
echo
for f in lucid-updates/binary-i386/*
do
  $PACMAN --product "Ubuntu 10.04 i686" --file $f >> $PACMAN_LOG
done
echo

for f in jessie-updates/binary-amd64/*
do
  $PACMAN --product "Debian 8.0 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in jessie-updates/binary-i386/*
do
  $PACMAN --product "Debian 8.0 i686" --file $f --security >> $PACMAN_LOG
done

for f in wheezy-updates/binary-amd64/*
do
  $PACMAN --product "Debian 7.0 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in wheezy-updates/binary-i386/*
do
  $PACMAN --product "Debian 7.0 i686" --file $f --security >> $PACMAN_LOG
done

for f in squeeze-updates/binary-amd64/*
do
  $PACMAN --product "Debian 6.0 x86_64" --file $f --security >> $PACMAN_LOG
done
echo
for f in squeeze-updates/binary-i386/*
do
  $PACMAN --product "Debian 6.0 i686" --file $f --security >> $PACMAN_LOG
done

cp $DIR/config.db $DIR/config.db-$DATE