Skip to content

Instantly share code, notes, and snippets.

@jenkoian
Last active September 23, 2017 19:03
Show Gist options
  • Save jenkoian/4654946 to your computer and use it in GitHub Desktop.
Save jenkoian/4654946 to your computer and use it in GitHub Desktop.
Small bash script to automatically install the latst PHPStorm EAP
#!/bin/bash
# Usage: ./update_phpstorm.sh http://download.jetbrains.com/webide/PhpStorm-EAP-126.36.tar.gz
echo "Downloading $1..."
sudo wget $1 -O phpstorm_eap.tar.gz
echo "Moving download..."
sudo mv phpstorm_eap.tar.gz /usr/local/bin/phpstorm_eap.tar.gz
echo "Descending into directory..."
cd /usr/local/bin
echo "Finding filename..."
phpstorm=$(tar -tvzf phpstorm_eap.tar.gz | grep phpstorm.sh | awk '{print $6}')
echo "Extracting..."
sudo tar xvzf phpstorm_eap.tar.gz
echo "Removing tar file..."
sudo rm -f /usr/local/bin/phpstorm_eap.tar.gz
echo "Setting permissions..."
sudo chmod +x ./$phpstorm
echo "Running PHPStorm..."
sudo ./$phpstorm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment