Skip to content

Instantly share code, notes, and snippets.

@almirb
Forked from theodorosploumis/Install_Phpstorm.sh
Last active January 29, 2018 17:06
Show Gist options
  • Save almirb/7666ce3b289e6a4604b8a74e05d9ceba to your computer and use it in GitHub Desktop.
Save almirb/7666ce3b289e6a4604b8a74e05d9ceba to your computer and use it in GitHub Desktop.
Update phpstorm on Ubuntu linux.
#!/bin/bash -e
# Original credits to theodorosploumis
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
# Remove old Phpstorm
echo "Removing old PhpStorm"
rm -rf /opt/phpstorm
# Download file from url
echo "Downloading PhpStorm to /tmp"
wget -O /tmp/phpstorm.tar.gz "https://data.services.jetbrains.com/products/download?code=PS&platform=linux" --no-check-certificate
# Unpacking file
tar -xzf /tmp/phpstorm.tar.gz -C /tmp
rm /tmp/phpstorm.tar.gz
# Copy new Phpstorm
echo "Copying new PhpStorm"
mv /tmp/PhpStorm* /opt/phpstorm
# 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