Register
It is currently Mon Dec 22, 2014 2:09 pm

to check SVN and GIT


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sat Oct 09, 2010 12:08 pm   

Joined: Sat Sep 11, 2010 12:31 pm
Posts: 7
Location: Israel
Hello everybody,

once again I have to ask you about some help.
I have the next task:

I have a lot of SVN-directories and GIT-directories on my server. In fact I have to go to every directory and to run there the command:
For GIT:
Code:
git pull

For SVN:
Code:
svn up


So, may be I have opportunity to write a scripts that it will check all directories and if it will find directory with name .svn it will run command svn up inside,
and it will find directory .git it will run command git pull inside.
Of course the script should work recursively, to check all the directories

Could you please to help me with this scrip?
Thank you for a help in advence.


Top
 Profile WWW ICQ  
 PostPosted: Mon Oct 11, 2010 12:06 pm   

Joined: Sat Sep 11, 2010 12:31 pm
Posts: 7
Location: Israel
I found the next sript:

Code:
cd SVN
for i in *
do
echo " === Processing $i === "
cd "$i"
if [ -e .svn ]
then
  svn up
elif [ -e .git ]
then
  git pull
fi
cd ..
done


But I'm not sure that it's work well.
I will test it.


Top
 Profile WWW ICQ  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP