Created
January 29, 2014 19:07
-
-
Save xiaom/8694700 to your computer and use it in GitHub Desktop.
install eclipse from tarball
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tar -xzvf eclipse*.tar.gz -C /opt | |
chmod -R +r /opt/eclipse | |
# use the technique "HERE document" | |
# http://tldp.org/LDP/abs/html/here-docs.html | |
(cat <<'EOF' | |
#!/bin/sh | |
export ECLIPSE_HOME="/opt/eclipse" | |
$ECLIPSE_HOME/eclipse $* | |
EOF | |
) > /usr/bin/eclipse | |
chmod 755 /usr/bin/eclipse | |
( cat <<'EOF' | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Eclipse | |
Comment=Eclipse SDK 4.3.1 | |
Exec=eclipse | |
Icon=/opt/eclipse/icon.xpm | |
Terminal=false | |
Type=Application | |
Categories=GNOME;Application;Development; | |
StartupNotify=true | |
EOF | |
) > /usr/share/applications/eclipse.desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment