Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

sup: bash script for universal SCM syncing (svn, svk, cvs, darcs, etc.)

I really can never remember if the project I'm in uses svn or cvs or if it's my own local svk mirror, etc. etc. Thus was born 'sup'!

Save and drop into a location that's in your PATH (I use ~/bin, YMMV)

#!/bin/bash
# sup -- a quick bash script to sync w/ various SCM tools
# @author   Jamie Wilkinson 

HERE=$(pwd)

## subversion
if [ -e ".svn" ]; then
        svn up
## cvs
elif [ -e "CVS" ]; then
        cvs up -dP
## darcs
elif [ -e "_darcs" ]; then
        darcs pull --all
## svk
elif [ -n "`grep $HERE ~/.svk/config`" ]; then
    svk up
## git
elif [ -e ".git" ]; then
    git pull
## perforce
#   todo
## arch
#   todo
## bzr
#   todo

fi
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed