LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-24-2012, 04:50 AM   #1
me_spearhead
Member
 
Registered: Feb 2007
Distribution: SUSE Linux, & Redhat Variants
Posts: 59

Rep: Reputation: 15
Revision history / version control for shell script


Hi

I am writing a bash shell script from last 5/6 months. The script has undergone a couple of bug fixes and new features being added to it as required. Can someone suggest a method to maintain the revision history ?Something like version control.

I am currently maintain it at the start of the script like :

Code:
#
!/bin/bash
######################################################################################################
##      Script to check xxxx xxxxx xxxxxxx                         ##
##      Author      : Xyyy Xyyyyyyy
##      Version 2.0 : Details of changes date
##      Version 3.0 : Details of changes date
##      Version 4.0 : Details of changes date
######################################################################################################
Is this the right way ? Is there a better way for the same ?
 
Old 05-24-2012, 04:53 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by me_spearhead View Post
Can someone suggest a method to maintain the revision history? Something like version control.
Keeping track of revisions takes some getting used to, it's more the discipline to check in, check out and log changes in a descriptive way you can read back later on than anything else, but once you've seen the benefit of it, for instance being able to revert to two versions earlier w/o any effort or add a branch to pursue a different idea, you'll never want to go back to the old way of backing up files. Just use RCS, CVS, SVN, Mercurial, GIT or whatever else system you think fits your project best. As for keeping track of changes textually: it depends. If it's single scripts you usually don't but larger projects, often the ones you share and distribute, will (or should) come with a separate change log.
 
Old 05-24-2012, 05:19 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,193

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
If it's private then store it in a Bitbucket account. They offer Mercurial and git hosting. If it's public then store it in a GitHub account.

Both are free.

Last edited by dugan; 05-24-2012 at 05:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Revision Control System of the Year jeremy 2011 LinuxQuestions.org Members Choice Awards 16 02-08-2012 11:59 AM
usage of history command inside shell script bsaheb Linux - Newbie 4 01-05-2010 08:55 PM
How to Add projects to SVN keeping revision/ history? your_shadow03 Linux - Server 1 06-10-2009 09:21 AM
Kdevelop and revision control cuzzle Linux - Software 1 11-15-2005 04:57 PM
Document Management / Revision Control logosys Linux - Software 1 11-11-2005 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration