Deprecated: Assigning the return value of new by reference is deprecated in /var/www/mistcat.com/public/gallery2/modules/core/classes/GalleryUtilities.class on line 854 Notice: Undefined index: wpg2_sidebargridblocksimageframe in /var/www/mistcat.com/public/wp-content/plugins/wpg2/wpg2functions.inc on line 556 Notice: Undefined variable: cssappendoutput in /var/www/mistcat.com/public/wp-content/plugins/wpg2/wpg2functions.inc on line 559

Subversion helper Bash Script

Sometimes repository names get long, and when you’re using subversion typing them all out can be a pain. I wrote this quick bash helper script to make using subversion with one repository easier and quicker to use.

#!/bin/bash

MYREPOSITORY="http://myrepository.net/svn"

#Script requires USERNAME, REPOSITORY DIRECTORY, and COMMAND
MINPARAMS=3

if [ $# -lt "$MINPARAMS" ]
then
  echo "  Usage: ./msvn username respository command"
  exit
fi

USERNAME=$1
REPOSITORY=$2
SVNCOMMAND=$3
shift
shift
shift
CPARAMS=$@

echo "`svn $SVNCOMMAND --username $USERNAME $MYREPOSITORY/$REPOSITORY $CPARAMS`"
Coding

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Leave Comment

(required)

(required)