eclipse-jee 508 B

123456789101112131415
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. if [[ "$OS" = "Darwin" ]]; then
  4. [[ -d "$HOME/Applications/Eclipse.app" ]] || brew cask install eclipse-jee
  5. else
  6. if ! has eclipse; then
  7. 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'
  8. TMP_FILE="/tmp/eclipse$$.tar.gz"
  9. curl -fSL "$URL" -o "$TMP_FILE"
  10. cd "$HOME"
  11. tar -xzf "$TMP_FILE"
  12. rm "$TMP_FILE"
  13. ln -sfv "$HOME/eclipse/eclipse" "$HOME/bin/eclipse"
  14. fi
  15. fi