Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. svncd() # directory repo [rev]
  2. {
  3.         if [ ! -d $1 ]; then
  4.                 echo "checking out $1"
  5.                 if [ $3 ]; then
  6.                         REV="-r $3"
  7.                 fi
  8.                 process "svn co $REV $2 $1" "checking out $1"
  9.         fi
  10.         cd $1
  11.         if [ $3 ]; then
  12.                 process "svn up -r $3" "updating $1 to revision $3"
  13.         fi
  14. }
  15.  
  16. gitcd() # directory repo [rev]
  17. {
  18.         if [ ! -d $1 ]; then
  19.                 process "git clone $2 $1" "checking out $1"
  20.         fi
  21.         cd $1
  22.         if [ $3 ]; then
  23.                 process "git fetch" "updating $1"
  24.                 process "git checkout $3" "checking out $3 for $1"
  25.         fi
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement