Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2009-09-03 19:12:32 +0400
committerLluis Sanchez <lluis@novell.com>2009-09-03 19:12:32 +0400
commit88e0d96261df366a17bcc238298221717fbb368c (patch)
treeb539b04c5a5524a2eb9bd8c3f1492c3056ff59f1 /scripts
parentfe5221a841d004284176d58c9bb15738c19cc4fd (diff)
Added script for getting a full MD directory from a branch/tag.
svn path=/trunk/monodevelop/; revision=141255
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mdget154
1 files changed, 154 insertions, 0 deletions
diff --git a/scripts/mdget b/scripts/mdget
new file mode 100755
index 0000000000..2f69eca0d5
--- /dev/null
+++ b/scripts/mdget
@@ -0,0 +1,154 @@
+#!/bin/bash
+version=
+prefix=/usr/local
+profile=stable
+trunkRoot=svn+ssh://mono-cvs.ximian.com/source/trunk/monodevelop
+branchesRoot=svn+ssh://mono-cvs.ximian.com/source/branches/monodevelop
+tagsRoot=svn+ssh://mono-cvs.ximian.com/source/tags/monodevelop
+destDirRoot=../..
+
+sourceRoot=$branchesRoot
+
+MSG=`mktemp`
+
+usage ()
+{
+ echo ""
+ echo "Usage : mdget [--profile=PROFILE] [--dir=DIRECTORY] [--tag] versionNumber"
+ echo ""
+ echo "Check outs a MonoDevelop branch or tag and the extras add-ins included"
+ echo "in the specified profile (which is 'stable' by default)."
+ echo ""
+ echo "PROFILE is the profile that contains the list of packages to check out."
+ echo ""
+ echo "DIRECTORY is the root directory where MonoDevelop will be checked out."
+ echo "Example: mdget --dir=/home/user/test 2.1"
+ echo "This command will checkout the 2.1 branch to the directory:"
+ echo "/home/user/test/monodevelop-2.1"
+ echo "The output directory is ../.. by default."
+ echo ""
+ echo "When the --tag option is specified, a tag will be checked out,"
+ echo "instead of a branch."
+ echo ""
+}
+
+validate_profile ()
+{
+ test -z "$1" && return 0
+ for c in `ls ../profiles`; do
+ if [ "$c" = "$1" ]; then
+ return 1
+ fi
+ done
+ return 0
+}
+
+read_packages ()
+{
+ for p in `sed -e /#/d -e 's/ /,/g' < ../profiles/$profile` ; do
+ path=`echo $p | cut -d ',' -f 1`
+ packages="$packages $path"
+ done
+ return 0
+}
+
+while test x$1 != x; do
+ case $1 in
+ --profile=*)
+ prof=`echo $1 | sed 's/--profile=//'`
+ validate_profile "$prof"
+ if [ $? -eq 1 ]; then
+ profile=$prof
+ else
+ echo "Invalid profile name - $conf"
+ usage
+ exit 1
+ fi
+ ;;
+ --profile)
+ shift
+ prof=$1
+ validate_profile "$prof"
+ if [ $? -eq 1 ]; then
+ profile=$prof
+ else
+ echo "Invalid profile name - $conf"
+ usage
+ exit 1
+ fi
+ ;;
+ --tag)
+ shift
+ sourceRoot=$tagsRoot
+ ;;
+ --help)
+ usage
+ exit
+ ;;
+ *)
+ version=$1
+ ;;
+ esac
+ shift
+done
+
+if [ "$version" = "" ]; then
+ usage
+ exit
+fi
+
+
+read_packages
+
+destDir=$destDirRoot/monodevelop-$version
+
+echo ""
+echo "MonoDevelop $version will be checked out from:"
+echo "$sourceRoot/*/$version"
+echo ""
+echo "The following directories will be created:"
+
+echo ""
+for p in $packages; do
+ echo "$destDir/$p"
+done
+
+while [[ 1 ]]
+do
+
+ read -a RESPONSE -p"Would you like to continue (Y)es/(N)o: "
+ if [[ $? != 0 ]]
+ then
+ RESPONSE="N"
+ fi
+
+ case $RESPONSE in
+ "Y" | "y" | "yes" | "Yes")
+
+ echo "Getting MonoDevelop $version ..."
+ mkdir $destDir
+ for p in $packages; do
+ echo "svn co $sourceRoot/$p/$version $destDir/$p"
+ svn co $sourceRoot/$p/$version $destDir/$p
+ done
+ cp ../configure $destDir/configure
+ cp ../MonoDevelop.mdw $destDir/MonoDevelop.mdw
+ cp ../Makefile $destDir/Makefile
+ cp ../extras/extras.mdw $destDir/extras/extras.mdw
+ mkdir $destDir/profiles
+ cp ../profiles/$profile $destDir/profiles/all
+ cp ../profiles/$profile $destDir/profiles/stable
+ cp ../profiles/$profile $destDir/profiles/default
+ exit 0
+ ;;
+
+ "N" | "n" | "no" | "No")
+ echo "Aborting..."
+ exit 1
+ ;;
+ *)
+ # try again
+ ;;
+ esac
+done
+