1 |
slords |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
slords |
1.5 |
prefix=sme |
4 |
slords |
1.9 |
ver=$(basename $(readlink -f /build/smeserver/stage/${1:-8})) |
5 |
slords |
1.5 |
isos=${2:-false} |
6 |
slords |
1.1 |
|
7 |
slords |
1.9 |
mkdir -p /build/smeserver/repo/testing/$ver/{${prefix}os,iso} |
8 |
slords |
1.5 |
if $isos |
9 |
slords |
1.1 |
then |
10 |
slords |
1.9 |
rsync -avhHP --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/testing/$ver/iso/ |
11 |
slords |
1.5 |
else |
12 |
slords |
1.9 |
rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/testing/$ver/iso/ |
13 |
slords |
1.1 |
fi |
14 |
slords |
1.9 |
rsync -avhHP --exclude 'product/' --exclude 'updates/' --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' --delete-excluded --delete /build/smeserver/stage/${ver:0:1}/ /build/smeserver/repo/testing/$ver/${prefix}os/ |
15 |
|
|
if [ -f /build/smeserver/repo/testing/$ver/${prefix}os/i386/repodata/comps.xml ] |
16 |
slords |
1.1 |
then |
17 |
slords |
1.9 |
createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/testing/$ver/${prefix}os/i386/ |
18 |
|
|
createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/testing/$ver/${prefix}os/x86_64/ |
19 |
slords |
1.1 |
fi |
20 |
|
|
|
21 |
slords |
1.9 |
ls /build > /dev/null |
22 |
|
|
find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \ |
23 |
|
|
-not -user releases -exec chown -h releases {} \+ \ |
24 |
|
|
, -not -regex ".*/${prefix}\(contribs\|updates-testing\)/i386/RPMS" \ |
25 |
|
|
-not -group releases -exec chgrp -h releases {} \+ \ |
26 |
|
|
, -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \ |
27 |
|
|
, -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \ |
28 |
|
|
, -regex ".*/${prefix}updates-testing/i386/RPMS" -exec chgrp updates {} \+ \ |
29 |
|
|
, -regex ".*/${prefix}contribs/i386/RPMS" -exec chgrp contribs {} \+ |