[Systems] Requesting feedback on the newpootle git commiter script.

Aneesh Dogra lionaneesh at gmail.com
Sun Aug 18 14:31:40 EDT 2013


Hello guys,

I have mocked up a basic script to automate translation committing for
projects hosted on newpootle. As Pootle 2.5's directory structure is very
different from ours and I don't think there is any way to convert our
directory structure to something similar to theirs (because we host our
projects category wise). Hence, I think its best to create a simple
standalone script which will work for our purposes. I think the following
script would do the job. I could really use some useful feedback or
alternate solutions to the problem.

#!/bin/bash
START_DIR=`pwd`
DIRS=`find $START_DIR -name ".git" -type d`
for DIR in $DIRS
do
    cd $START_DIR/$DIR/../
    echo -e "\n---- Committing files in `pwd` ----\n"
    git commit -a -m "Pootle commit." 2>&1 >/dev/null
    git pull 2>&1 >/dev/null
    git rebase
    REBASE_RETURN=$?
    [ $RETVAL -ne 0 ] && echo "Rebase failed in $START_DIR/$DIR. Please
check and fix the conflicts."
    [ $RETVAL -eq 0 ] && git push
    echo -e "\n----*-----------------------*----\n"
done

-- 
Thanks
Aneesh Dogra (lionaneesh)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/private/systems/attachments/20130819/cf737b9f/attachment.html>


More information about the Systems mailing list