[wp-polyglots] Re: bash-script

mrfroasty mrfroasty at gmail.com
Fri Apr 24 22:35:13 GMT 2009


Hello,

I thought I would share this script that help me generate .mo files for 
my local blog, commit those changes to svn servers....

P:S
Very basic bash-script though :-)

GR
muhsin


#!/bin/bash
#Author Muhsin, at 2009
#This small scripts doest approximately 2 things:
#1]Generate sw.mo
#2]commit changes to wordpress-svn && my own svn

dir="/home/muhsin/NetBeansProjects/blog.mambo-tech.net/wp-content/languages"
svn1="https://fileserver/svn/webapps/blog.mambo-tech.net/wp-content/languages"
svn2="http://svn.automattic.com/wordpress-i18n/sw/trunk/messages/"
exported="/home/muhsin/NetBeansProjects/blog.mambo-tech.net/wp-content/languages/exported/"

execute()
{
    cd $dir
    fl=sw.po
    find * -mtime 0 -name $fl | while read filename;do
        msgfmt -o sw.mo sw.po;echo "generating *.mo..."
        rsync -av sw.mo sw.po $exported;echo "exporting.."
        #svn1
        svn commit -m "translating...";
        #svn2
        cd $exported
    done
}

#call
execute

exit 0

-- 
Extra details:
OSS:Gentoo Linux-2.6.25-r8
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
Typo:40WPM
url:http://mambo-tech.net
url:http://blog.mambo-tech.net



More information about the wp-polyglots mailing list