Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added eclipse director script, for easy command-line

provisioning operations. Modify it to point to your eclipse directory
(or pass it using --eclipse-dir), and easily install or uninstall
scala plugin versions.
  • Loading branch information...
commit 93537d2c3b6601cfdc6ff55e1b478aa90b17fad4 1 parent d69bfec
@dragos dragos authored
Showing with 93 additions and 0 deletions.
  1. +93 −0 eclipse-director.sh
View
93 eclipse-director.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+eclipse_dir="/Applications/Programming/eclipse-helios/"
+eclipse_opt="-nosplash -consoleLog"
+app="org.eclipse.equinox.p2.director"
+
+eclipse_repo="http://download.eclipse.org/releases/helios/"
+branch="master"
+scala_repo="http://scala-ide.dreamhosters.com/nightly-update"
+
+function usage()
+{
+ cat <<EOF
+`basename $0` [opt] command [pluginid]
+
+Options:
+ --eclipse-dir <path> Path to the Eclipse installation that you want to modify
+
+Commands:
+ list List available plugins. (useless right now, as it uses the Eclipse repo).
+
+ install <id> Install plugin. It is the version number of the Scala installation
+ For instance: 2.9.1.final or trunk
+
+ uninstall Uninstall the currently installed Scala plugin
+
+ uninstall-bundle <id> Uninstall the given bundle
+
+ help Print this help screen
+
+EOF
+ exit 1
+}
+
+while [ $# -gt 0 ]; do
+
+ case $1 in
+ "" | "help")
+ usage
+ ;;
+
+ "--eclipse-dir")
+ eclipse_dir=$2
+ echo "Eclipse installation dir is $eclipse_dir"
+ shift 2
+ ;;
+
+ "--branch")
+ branch=$2
+ echo "Eclipse repository is $scala_repo-$branch-?"
+ shift 2
+ ;;
+
+ "list")
+ $eclipse_dir/eclipse $eclipse_opt \
+ -application $app \
+ -repository $eclipse_repo \
+ -list
+ shift
+ ;;
+
+ "install")
+ echo "Installing $2.."
+ $eclipse_dir/eclipse $eclipse_opt \
+ -application $app \
+ -repository "$scala_repo-$branch-$2" \
+ -installIU org.scala-ide.sdt.feature.feature.group
+ shift 2
+ ;;
+
+ "uninstall")
+ echo "Unnstalling.."
+ shift 1
+ $eclipse_dir/eclipse $eclipse_opt \
+ -application $app \
+ -repository "$eclipse_repo" \
+ -uninstallIU org.scala-ide.sdt.feature.feature.group
+ ;;
+
+ "uninstall-bundle")
+ echo "Unnstalling.. $2"
+ $eclipse_dir/eclipse $eclipse_opt \
+ -application $app \
+ -repository "$eclipse_repo" \
+ -uninstallIU $2
+ shift 2
+ ;;
+
+ *)
+ usage
+ ;;
+ esac
+done
Please sign in to comment.
Something went wrong with that request. Please try again.