/[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.10 by slords, Wed Feb 13 19:36:25 2013 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  prefix=sme
6  ver=$(basename $(readlink -f /build/smeserver/stage/${1:-9}))  ver=$(basename $(readlink -f /build/smeserver/stage/${1:-10}))
7  isos=${2:-false}  isos=${2:-false}
8  dest=testing  dest="testing"
9    
10  mkdir -p  /build/smeserver/repo/$dest/$ver/{${prefix}os,iso}  mkdir -p  /build/smeserver/repo/$dest/$ver/{${prefix}os,iso}
11  if $isos  if $isos
12  then  then
13      rsync -avhHP --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/iso/      rsync -avhHP --delete /build/smeserver/stage/iso/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/iso/
14  else  else
15      rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/iso/      rsync -avhHP --exclude '*.iso*' --delete-excluded --delete /build/smeserver/stage/iso/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/iso/
16  fi  fi
17  rsync -avhHP --exclude 'product/' --exclude 'updates/' --delete-excluded --delete \  rsync -avhHP --exclude 'product/' --exclude 'updates/' --delete-excluded --delete \
18      --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' \      --exclude 'pkgorder.*' --exclude 'build_*' --exclude '*.jigdo/' \
19      /build/smeserver/stage/${ver:0:1}/ /build/smeserver/repo/$dest/$ver/${prefix}os/      /build/smeserver/stage/${ver%%.*}/ /build/smeserver/repo/$dest/$ver/${prefix}os/
20    
21  if [ ${ver:0:1} -eq 8 ]  if [ ${ver%%.*} -eq 8 ]
22  then  then
23      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/i386/
24      createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/x86_64/      createrepo --update --database --checksum sha --groupfile repodata/comps.xml /build/smeserver/repo/$dest/$ver/${prefix}os/x86_64/
25  fi  fi
26    
27  ls /build > /dev/null  ls /build > /dev/null
28    if [ ${ver%%.*} -eq 10 ]
29    then
30    
31    find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \
32          -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/ \  find /build/builds/ /build/smeserver/repo/ /build/smeserver//stage/ \
41        -not -user releases -exec chown -h releases {} \+ \        -not -user releases -exec chown -h releases {} \+ \
42      , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/i386/RPMS" \      , -not -regex ".*/${prefix}\(contribs\|updates-testing\)/\(i386\|x86_64\)/RPMS" \
43        -not -group releases -exec chgrp -h releases {} \+ \        -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 {} \+ \      , -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 {} \+ \      , -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 {} \+ \      , -regex ".*/${prefix}updates-testing/i386/RPMS" -exec chgrp updates {} \+ \
47      , -regex ".*/${prefix}contribs/i386/RPMS" -exec chgrp contribs {} \+      , -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