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