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