Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 109 lines (85 sloc) 2.927 kb
93537d2 @dragos Added eclipse director script, for easy command-line
dragos authored
1 #!/bin/bash
2
3 eclipse_dir="/Applications/Programming/eclipse-helios/"
4 eclipse_opt="-nosplash -consoleLog"
5 app="org.eclipse.equinox.p2.director"
6
7 eclipse_repo="http://download.eclipse.org/releases/helios/"
8 branch="master"
9 scala_repo="http://scala-ide.dreamhosters.com/nightly-update"
10
11 function usage()
12 {
13 cat <<EOF
14 `basename $0` [opt] command [pluginid]
15
16 Options:
17 --eclipse-dir <path> Path to the Eclipse installation that you want to modify
18
c946e0e @dragos Updated the director script with an option to install from an update sit...
dragos authored
19 --branch <branch> What branch to use? (e.g. master or 2-0-x)
20
93537d2 @dragos Added eclipse director script, for easy command-line
dragos authored
21 Commands:
22 list List available plugins. (useless right now, as it uses the Eclipse repo).
23
24 install <id> Install plugin. It is the version number of the Scala installation
25 For instance: 2.9.1.final or trunk
26
c946e0e @dragos Updated the director script with an option to install from an update sit...
dragos authored
27 install-local <path> Install from a local update site given by <path>
28
93537d2 @dragos Added eclipse director script, for easy command-line
dragos authored
29 uninstall Uninstall the currently installed Scala plugin
30
c946e0e @dragos Updated the director script with an option to install from an update sit...
dragos authored
31 install-bundle <id> Install the given bundle
32
93537d2 @dragos Added eclipse director script, for easy command-line
dragos authored
33 uninstall-bundle <id> Uninstall the given bundle
34
35 help Print this help screen
36
37 EOF
38 exit 1
39 }
40
41 while [ $# -gt 0 ]; do
42
43 case $1 in
44 "" | "help")
45 usage
46 ;;
47
48 "--eclipse-dir")
49 eclipse_dir=$2
50 echo "Eclipse installation dir is $eclipse_dir"
51 shift 2
52 ;;
53
54 "--branch")
55 branch=$2
56 echo "Eclipse repository is $scala_repo-$branch-?"
57 shift 2
58 ;;
59
60 "list")
61 $eclipse_dir/eclipse $eclipse_opt \
62 -application $app \
63 -repository $eclipse_repo \
64 -list
65 shift
66 ;;
67
68 "install")
69 echo "Installing $2.."
70 $eclipse_dir/eclipse $eclipse_opt \
71 -application $app \
72 -repository "$scala_repo-$branch-$2" \
73 -installIU org.scala-ide.sdt.feature.feature.group
74 shift 2
75 ;;
76
c946e0e @dragos Updated the director script with an option to install from an update sit...
dragos authored
77 "install-local")
78 echo "Installing $2.."
79 $eclipse_dir/eclipse $eclipse_opt \
80 -application $app \
81 -repository "file://$2" \
82 -installIU org.scala-ide.sdt.feature.feature.group
83 shift 2
84 ;;
85
93537d2 @dragos Added eclipse director script, for easy command-line
dragos authored
86 "uninstall")
87 echo "Unnstalling.."
88 shift 1
89 $eclipse_dir/eclipse $eclipse_opt \
90 -application $app \
91 -repository "$eclipse_repo" \
92 -uninstallIU org.scala-ide.sdt.feature.feature.group
93 ;;
94
95 "uninstall-bundle")
96 echo "Unnstalling.. $2"
97 $eclipse_dir/eclipse $eclipse_opt \
98 -application $app \
99 -repository "$eclipse_repo" \
100 -uninstallIU $2
101 shift 2
102 ;;
103
104 *)
105 usage
106 ;;
107 esac
108 done
Something went wrong with that request. Please try again.