Skip to content

Instantly share code, notes, and snippets.

@olivertappin
Created July 20, 2017 07:58
Show Gist options
  • Save olivertappin/e5920e131db9a451c91aa6e2bc24dc40 to your computer and use it in GitHub Desktop.
Save olivertappin/e5920e131db9a451c91aa6e2bc24dc40 to your computer and use it in GitHub Desktop.

Revisions

  1. olivertappin created this gist Jul 20, 2017.
    21 changes: 21 additions & 0 deletions update-phpstorm.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    #!/bin/bash

    if [ "$(whoami)" != "root" ]
    then
    echo "Sorry, you are not root."
    exit 1
    fi

    echo "Downloading the latest PhpStorm to /tmp"
    cd /tmp
    curl -Lo PhpStorm.tar.gz "https://data.services.jetbrains.com/products/download?code=PS&platform=linux"
    tar -xzf /tmp/PhpStorm.tar.gz
    rm /tmp/PhpStorm.tar.gz

    echo "Removing old PhpStorm"
    rm -rf /opt/phpstorm

    echo "Copying new PhpStorm"
    mv /tmp/PhpStorm* /opt/phpstorm

    echo "New PhpStorm has been installed"