Home Home > 2009 > 05 > 15 > cat /usr/local/bin/osc
Sign up | Login

cat /usr/local/bin/osc

May 15th, 2009 by

Until the Build Service supports git natively (see the GSoC project) , here is what I use to track my changes locally:

#cat /usr/local/bin/osc  :

#!/bin/bash

/usr/bin/osc “$@”

if [ -e .osc/_files ]; then

if [ ! -d .git ] ; then  git init ; echo “.osc” > .gitignore ; echo “.gitignore” >> .gitignore ; fi
mydate=$(date)

git add `find -maxdepth 1 -type f | grep -v “.git”`
for i in $( git status | grep “deleted:” | cut -d” ” -f7 ) ; do
git rm $i;
done

git commit -a -m”$mydate”

fi

Both comments and pings are currently closed.

Comments are closed.