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