/[smeserver]/builds_bin/locale-patch
ViewVC logotype

Diff of /builds_bin/locale-patch

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

Revision 1.4 by jpp, Fri Nov 24 20:26:09 2017 UTC Revision 1.5 by jpp, Sun Jun 14 05:54:38 2020 UTC
# Line 5  export CVS_RSH=ssh Line 5  export CVS_RSH=ssh
5  rm -rf /var/lib/pootle/cvs/patch/*  rm -rf /var/lib/pootle/cvs/patch/*
6  cd /var/lib/pootle/cvs/patch  cd /var/lib/pootle/cvs/patch
7    
8  ls /var/www/html/pootle/patches/*/*.patch | cut -d/ --output-delimiter " " -f6,7 | while read ver newpatch  #newpatch=/var/www/html/patches/smeserver-sme7admin-1.1.1-locale-2009-03-05.patch
9    ls /var/www/html/patches/*/*.patch | cut -d/ --output-delimiter " " -f6,7 | while read ver newpatch
10  do  do
11      [ ! -s "/var/www/html/pootle/patches/$ver/$newpatch" ] && continue      [ ! -s "/var/www/html/patches/$ver/$newpatch" ] && continue
12      pkg=$(echo $newpatch | sed 's,-[0-9.]\+-locale-[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}.patch,,')      pkg=$(echo $newpatch | sed 's,-[0-9.]\+-locale-[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}.patch,,')
13      chglog=$(echo $newpatch | sed "s,$pkg-[0-9.]\+-locale-,locale ,;s,\.patch, patch,")      chglog=$(echo $newpatch | sed "s,$pkg-[0-9.]\+-locale-,locale ,;s,\.patch, patch,")
14            
# Line 29  do Line 30  do
30          [ -z "$patch" ] && insert2="%setup" || insert2=$(echo $patch | perl -pe 's,^(Patch[0-9]*):,"%".lc($1),ie')          [ -z "$patch" ] && insert2="%setup" || insert2=$(echo $patch | perl -pe 's,^(Patch[0-9]*):,"%".lc($1),ie')
31          insert1=${patch:=$source}          insert1=${patch:=$source}
32    
33          perl -i -pe 's,^(%define\s+release\s+)([0-9]+)(%{\?dist})\s*,"$1".($2+1)."$3\n",ie;s,^(Release:\s+)([0-9]+)(%{\?dist})\s*,"$1".($2+1)."$3\n",ie;' $spec          perl -i -pe 's,^(%define\s+release\s+)([0-9]+)\s*,"$1".($2+1)."\n",ie;s,^(Release:\s+)([0-9]+)(%{\?dist})\s*,"$1".($2+1)."$3\n",ie;' $spec
34          verrel=$(rpm -q -D 'dist .sme' --qf '%{VERSION}-%{RELEASE}\n' --specfile $spec | head -1)          verrel=$(rpm -q -D 'dist .sme' --qf '%{VERSION}-%{RELEASE}\n' --specfile $spec | head -1)
35          sed -i "/^$insert1/aPatch$pnum: $(basename $newpatch)" $spec          sed -i "/^$insert1/aPatch$pnum: $(basename $newpatch)" $spec
36          sed -i "/^$insert2\b/a%patch$pnum -p1" $spec          sed -i "/^$insert2\b/a%patch$pnum -p1" $spec
37          sed -i "/^%changelog/a* $(date +'%a %b %d %G') SME Translation Server <translations@contribs.org> $verrel\n- apply $chglog\n" $spec          sed -i "/^%changelog/a* $(date +'%a %b %d %G') SME Translation Server <translations@contribs.org> $verrel\n- apply $chglog\n" $spec
38          cp /var/www/html/pootle/patches/$ver/$newpatch $(dirname $spec)          cp /var/www/html/patches/$ver/$newpatch $(dirname $spec)
39          pushd $(dirname $spec) > /dev/null          pushd $(dirname $spec) > /dev/null
40          cvs -Q add $(basename $newpatch)          cvs -Q add $(basename $newpatch)
41          [ "$1" == "commit" ] && make commit tag > /dev/null          [ "$1" == "commit" ] && make commit tag > /dev/null


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