/[soft]/mgatools/trunk/functions
ViewVC logotype

Contents of /mgatools/trunk/functions

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1708 - (show annotations) (download)
Wed Jun 22 23:11:01 2011 UTC (12 years, 9 months ago) by boklm
File size: 930 byte(s)
add / at the end of path to mirror
1 #!/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 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 function update_hdlist()
32 {
33 repository="$1"
34 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 }
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 /usr/bin/rsync $mirror_rsync_options "$distribdir/$distrorelease/" "$finaldistribdir/$distrorelease/"
54 }
55

  ViewVC Help
Powered by ViewVC 1.1.30