--- builds_bin/rsync_sme 2010/02/12 18:52:06 1.1 +++ builds_bin/rsync_sme 2013/02/13 19:36:25 1.10 @@ -1,31 +1,33 @@ #!/bin/bash -ver7=7.5beta1 -ver8=8.0beta5 -isos=false +prefix=sme +ver=$(basename $(readlink -f /build/smeserver/stage/${1:-9})) +isos=${2:-false} +dest=testing -mkdir -p /releases/testing/$ver8/{smeos,iso} +mkdir -p /build/smeserver/repo/$dest/$ver/{${prefix}os,iso} if $isos then - rsync -avhHP --delete /stage/iso/7/ /releases/testing/$ver7/iso/ + rsync -avhHP --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/iso/ else - rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /stage/iso/7/ /releases/testing/$ver7/iso/ + rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/iso/ fi -rsync -avhHP --exclude 'product/' --exclude 'updates/' --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' --delete-excluded --delete /stage/7/ /releases/testing/$ver7/smeos/ +rsync -avhHP --exclude 'product/' --exclude 'updates/' --delete-excluded --delete \ + --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' \ + /build/smeserver/stage/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/${prefix}os/ -if $isos +if [ ${ver:0:1} -eq 8 ] 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/ + createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/i386/ + createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/x86_64/ 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/ -ls /builds /releases /stage > /dev/null -find /builds/ /releases/ /stage/ -\( -not -user releases -o -not -group releases -\) -print0 | xargs -r0 chown releases:releases -chgrp updates /releases/{7,testing/8}/smeupdates-testing/i386/RPMS -chgrp contribs /releases/{7,testing/8}/smecontribs/i386/RPMS -find /builds/ /releases/ /stage/ -type f -\( -not -perm -664 -o -perm -002 -\) -print0 | xargs -r0 chmod u+rw,g+rw,o+r,o-w -find /builds/ /releases/ /stage/ -type d -\( -not -perm -2775 -o -perm -002 -\) -print0 | xargs -r0 chmod u+rwx,g+rwxs,o+rx,o-w +ls /build > /dev/null +find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \ + -not -user releases -exec chown -h releases {} \+ \ + , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/i386/RPMS" \ + -not -group releases -exec chgrp -h releases {} \+ \ + , -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \ + , -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \ + , -regex ".*/${prefix}updates-testing/i386/RPMS" -exec chgrp updates {} \+ \ + , -regex ".*/${prefix}contribs/i386/RPMS" -exec chgrp contribs {} \+