/[smeserver]/builds_bin/rsync_sme
ViewVC logotype

Diff of /builds_bin/rsync_sme

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.4 by slords, Sun Aug 15 16:27:13 2010 UTC Revision 1.11 by jpp, Sun Jun 14 05:54:38 2020 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    #change the release number on the ver line
3    # run this as root
4    # set det to testing or empty
5    prefix=sme
6    ver=$(basename $(readlink -f /build/smeserver/stage/${1:-10}))
7    isos=${2:-false}
8    dest="testing"
9    
10  #ver7=7.5.1  mkdir -p  /build/smeserver/repo/$dest/$ver/{${prefix}os,iso}
11  ver8=8.0beta6  if $isos
 isos=false  
   
 if [ ! -z "$ver7" ]  
12  then  then
13      mkdir -p  /releases/testing/$ver7/{smeos,iso}      rsync -avhHP --delete /build/smeserver/stage/iso/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/iso/
14      if $isos  else
15      then      rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver%%.*}/ /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/  
16  fi  fi
17    rsync -avhHP --exclude 'product/' --exclude 'updates/' --delete-excluded --delete \
18        --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' \
19        /build/smeserver/stage/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/${prefix}os/
20    
21  if [ ! -z "$ver8" ]  if [ ${ver%%.*} -eq 8 ]
22  then  then
23      mkdir -p  /releases/testing/$ver8/{smeos,iso}      createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/i386/
24      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/  
25  fi  fi
26    
27  ls /builds /releases /stage > /dev/null  ls /build > /dev/null
28  find /builds/ /releases/ /stage/ -not -user releases -exec chown releases {} \+ -o -not -group releases -exec chgrp releases {} \+  if [ ${ver%%.*} -eq 10 ]
29  chgrp updates /releases/{7,testing/8}/smeupdates-testing/i386/RPMS  then
30  chgrp contribs /releases/{7,testing/8}/smecontribs/i386/RPMS  
31  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 /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \
32  find /builds/ /releases/ /stage/ -type d -\( -not -perm -2775 -o -perm -002 -\) -print0 | xargs -r0 chmod u+rwx,g+rwxs,o+rx,o-w        -not -user releases -exec chown -h releases {} \+ \
33        , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/x86_64/RPMS" \
34          -not -group releases -exec chgrp -h releases {} \+ \
35        , -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \
36        , -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \
37        , -regex ".*/${prefix}updates-testing/x86_64/RPMS" -exec chgrp updates {} \+ \
38        , -regex ".*/${prefix}contribs/x86_64/RPMS" -exec chgrp contribs {} \+
39    else
40    find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \
41          -not -user releases -exec chown -h releases {} \+ \
42        , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/\(i386\|x86_64\)/RPMS" \
43          -not -group releases -exec chgrp -h releases {} \+ \
44        , -type f -\( -not -perm -664 -o -perm -002 -\) -exec chmod u+rw,g+rw,o+r,o-w {} \+ \
45        , -type d -\( -not -perm -2775 -o -perm -002 -\) -exec chmod u+rwx,g+rwxs,o+rx,o-w {} \+ \
46        , -regex ".*/${prefix}updates-testing/i386/RPMS" -exec chgrp updates {} \+ \
47        , -regex ".*/${prefix}contribs/i386/RPMS" -exec chgrp contribs {} \+
48    fi


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed