Created
April 6, 2012 19:39
-
-
Save gugat/2322373 to your computer and use it in GitHub Desktop.
Public Installation scripts
This file contains 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/bash | |
# | |
# Script to install Aptana and create a launcher. | |
# Not tested. | |
# Based on instructions: http://www.ubuntu-guia.com/2011/07/instalar-aptana-studio-3-ubuntu.html | |
# Author: Gustavo Salazar <[email protected]> | |
# Date: July 29, 2012 | |
# How to use: | |
# chmod +x install-aptana | |
# ./install-aptana | |
# | |
cd /opt/ | |
wget http://download.aptana.com/studio3/standalone/3.2.0/linux/Aptana_Studio_3_Setup_Linux_x86_64_3.2.0.z | |
sudo apt-get install unzip --yes | |
unzip Aptana_Studio_3_Setup_Linux_x86_64_3.2.0.zip | |
mv /opt/Aptana_Studio_3 /opt/aptana | |
echo '#!/bin/sh | |
export APTANA_HOME="/opt/aptana" | |
$APTANA_HOME/AptanaStudio3 $* | |
' | sudo tee -a /usr/bin/aptana | |
sudo chmod 755 /usr/bin/aptana | |
sudo chmod -R +r /opt/aptana | |
sudo chmod +x `sudo find /opt/aptana -type d` | |
VER=$(lsb_release -sr) | |
if [ "$VER" == "11.04" ]; then | |
EXEC="env UBUNTU_MENUPROXY= /opt/aptana/AptanaStudio3" | |
else | |
EXEC="/opt/aptana/AptanaStudio3" | |
fi | |
echo "[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Aptana Studio 3 | |
Comment=IDE for software developers | |
Exec=$EXEC | |
Icon=/opt/aptana/icon.xpm | |
Terminal=false | |
Type=Application | |
Categories=GNOME;Application;Development; | |
StartupNotify=true" | sudo tee -a /usr/share/applications/aptana.desktop | |
rm /opt/Aptana_Studio_3_Setup_Linux_x86_64_3.2.0.zip |
This file contains 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/bash | |
# | |
# Script to install Maven. | |
# Tested in: Ubuntu 11.04 | |
# Based on instructions: http://maven.apache.org/download.html#Installation | |
# Author: Gustavo Salazar <[email protected]> | |
# Date: April 6, 2012 | |
# How to use: | |
# chmod +x install-maven | |
# ./install-maven | |
set -x | |
#Set the url to download acpache-maven-X.Y.Z-bin.tar.gz | |
MAVEN_DOWNLOAD_URL=http://apache.mirrors.hoobly.com/maven/binaries/apache-maven-3.0.4-bin.tar.gz | |
#Set the installation directory | |
MAVEN_INSTALL_DIR=/usr/local/apache-maven | |
install_maven() { | |
cd /tmp | |
wget $MAVEN_DOWNLOAD_URL | |
file_name=`basename $MAVEN_DOWNLOAD_URL` | |
tar -xvzf $file_name | |
maven_folder=`echo $file_name | cut -d'-' -f 1-3` | |
sudo mkdir $MAVEN_INSTALL_DIR | |
sudo mv $maven_folder $MAVEN_INSTALL_DIR | |
M2_HOME=$MAVEN_INSTALL_DIR/$maven_folder | |
echo $M2_HOME | |
if [ -z "$(grep "M2_HOME" ~/.profile)" ]; then | |
sed -i " | |
/^PATH/ i\ | |
M2_HOME=$M2_HOME export M2_HOME | |
" ~/.profile | |
sed -i '/^PATH/ s/$/:$M2_HOME\/bin/' ~/.profile | |
else | |
sed -i " | |
/^M2_HOME/ c\ | |
M2_HOME=$M2_HOME export M2_HOME | |
" ~/.profile | |
fi | |
source ~/.profile | |
echo "Maven is installed. Type mvn -v to check. " | |
} | |
install_maven |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment