Created
February 1, 2017 09:10
-
-
Save Inquizarus/04ee48cefddbf82a9a0956fc3ecd581c to your computer and use it in GitHub Desktop.
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/bash -e | |
# IMPORTANT. This will install phpstorm to the shared application space in /usr | |
# IMPORTANT. Run with sudo! | |
echo -n "Please enter the PhpStorm download url (eg http://download.jetbrains.com/webide/PhpStorm-EAP-141.690.tar.gz): " | |
read url | |
# Download file from url | |
echo "Downloading PhpStorm to /tmp" | |
cd /tmp | |
wget ${url} --no-check-certificate | |
tar -xzf ~/Desktop/PhpStorm*.tar.gz | |
rm /tmp/PhpStorm*.tar.gz | |
# Remove old Phpstorm | |
echo "Removing old PhpStorm" | |
rm -rf /usr/share/applications/phpstorm | |
# Copy new Phpstorm | |
echo "Copying new PhpStorm" | |
mv /tmp/PhpStorm* /usr/share/applications/phpstorm | |
read -p "Would you like to download and install a desktop entry for phpstorm?" -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
wget "https://gist.githubusercontent.com/Inquizarus/cb18ea7105028cb2b7776946a96d3ad3/raw/17ccfba63816aaf9cb4b48e68da34ebfcec16eb9/jetbrains-phpstorm.desktop" | |
mv jetbrains-phpstorm.desktop /usr/share/applications/ | |
fi | |
# Finish | |
echo "New PhpStorm has been installed!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment