Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Update phpstorm on Ubuntu linux.
#!/bin/bash -e
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
# Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
# SUDO? @source http://stackoverflow.com/a/18216122
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
echo -n "Please enter the PhpStorm download url (eg https://download.jetbrains.com/webide/PhpStorm-2016.2.1.tar.gz): "
read url
# Download file from url
echo "Downloading PhpStorm to ~/Desktop"
cd ~/Desktop
wget ${url} --no-check-certificate
tar -xzf ~/Desktop/PhpStorm*
rm ~/Desktop/PhpStorm*
# Remove old Phpstorm
echo "Removing old PhpStorm"
rm -rf /opt/phpstorm
# Copy new Phpstorm
echo "Copying new PhpStorm"
mv ~/Desktop/PhpStorm* /opt/phpstorm
# Finish
echo "New PhpStorm has been installed!"
#Run phpStorm
echo "starting PhpStorm"
runuser -l $SUDO_USER -c"bash /opt/phpstorm/bin/phpstorm.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.