1 |
boklm |
1698 |
#!/bin/sh |
2 |
|
|
|
3 |
|
|
. /etc/mgatools.conf |
4 |
|
|
|
5 |
|
|
function isingroup() |
6 |
|
|
{ |
7 |
|
|
grp="$1" |
8 |
|
|
for group in `groups` |
9 |
|
|
do if [ "$grp" = "$group" ] |
10 |
|
|
then |
11 |
|
|
return 0 |
12 |
|
|
fi |
13 |
|
|
done |
14 |
|
|
return 1 |
15 |
|
|
} |
16 |
|
|
|
17 |
boklm |
1703 |
function inlist() |
18 |
|
|
{ |
19 |
|
|
k="$1" |
20 |
|
|
list="$2" |
21 |
|
|
for e in $list |
22 |
|
|
do |
23 |
|
|
if [ a"$k" = a"$e" ] |
24 |
|
|
then |
25 |
|
|
return 0 |
26 |
|
|
fi |
27 |
|
|
done |
28 |
|
|
return 1 |
29 |
|
|
} |
30 |
|
|
|
31 |
boklm |
1706 |
function update_hdlist() |
32 |
|
|
{ |
33 |
|
|
repository="$1" |
34 |
boklm |
1707 |
fdeps="$repository/../../media_info/file-deps" |
35 |
|
|
test -f "$fdeps" && ofdeps="--file-deps $fdeps" |
36 |
|
|
/usr/bin/genhdlist2 -v --versioned --allow-empty-media $ofdeps "$repository" |
37 |
boklm |
1706 |
} |
38 |
|
|
|
39 |
|
|
function update_common_MD5SUM() |
40 |
|
|
{ |
41 |
|
|
distrorelease="$1" |
42 |
|
|
for arch in $arches |
43 |
|
|
do |
44 |
|
|
pushd "$distribdir/$distrorelease/$arch/media/media_info" |
45 |
|
|
/usr/bin/md5sum hdlist_* synthesis.* > MD5SUM |
46 |
|
|
popd |
47 |
|
|
done |
48 |
|
|
} |
49 |
|
|
|
50 |
|
|
function mirror_repository() |
51 |
|
|
{ |
52 |
|
|
distrorelease="$1" |
53 |
boklm |
1708 |
/usr/bin/rsync $mirror_rsync_options "$distribdir/$distrorelease/" "$finaldistribdir/$distrorelease/" |
54 |
boklm |
1706 |
} |
55 |
|
|
|