浏览代码

add java, eclipse-jee, my/java

Kyle P Davis 9 年之前
父节点
当前提交
37a1e691a6
共有 3 个文件被更改,包括 29 次插入0 次删除
  1. 15 0
      gimmes/eclipse-jee
  2. 8 0
      gimmes/java
  3. 6 0
      gimmes/my/java

+ 15 - 0
gimmes/eclipse-jee

@@ -0,0 +1,15 @@
+#!/bin/bash
+set -o errexit -o pipefail
+if [[ "$OS" = "Darwin" ]]; then
+	[[ -d "$HOME/Applications/Eclipse.app" ]]  ||  brew cask install eclipse-jee
+else
+	if ! has eclipse; then
+		URL='http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/R/eclipse-jee-mars-R-linux-gtk-x86_64.tar.gz&r=1'
+		TMP_FILE="/tmp/eclipse$$.tar.gz"
+		curl -fSL "$URL" -o "$TMP_FILE"
+		cd "$HOME"
+		tar -xzf "$TMP_FILE"
+		rm "$TMP_FILE"
+		ln -sfv "$HOME/eclipse/eclipse" "$HOME/bin/eclipse"
+	fi
+fi

+ 8 - 0
gimmes/java

@@ -0,0 +1,8 @@
+#!/bin/bash
+set -o errexit -o pipefail
+
+if [[ "$OS" = "Darwin" ]]; then
+	has java  ||  brew cask install java
+else
+	has java  ||  gimme_pkg openjdk-8-jdk
+fi

+ 6 - 0
gimmes/my/java

@@ -0,0 +1,6 @@
+#!/bin/bash
+set -o errexit -o pipefail
+
+gimme \
+	java \
+	eclipse-jee