Full command line install

I'm trying out diffrent Ubuntu flavours and hammering on them as much as I can too see where/when they break.
At this part I'm succeeding quite well :)
To get back up and running as fast as possible I'm also creating install scripts which restore as much as possible.

I got a script that will download and install phpstorm but it can't add the license and import the settings.

Is there any way to do this?

 

The script thus far for those interested.

    #!/bin/bash

    ######################
    # SUDO?  @source http://stackoverflow.com/a/18216122
    if [ "$EUID" -ne 0 ]; then
        echo "Please run as root"
        exit
    fi

    PHPSTORMPATH='/usr/local/phpstorm'

    if [ -d "$HOMEPHPSTORMPATH" ]; then
        echo 'Path exists, removing content'
        sudo rm $PHPSTORMPATH/* -rf
    else
        echo "Creating path in $PHPSTORMPATH"
        sudo mkdir $PHPSTORMPATH
    fi

    cd $PHPSTORMPATH

    echo 'Downloading'
    wget https://download-cf.jetbrains.com/webide/PhpStorm-2016.1.2.tar.gz

    echo 'unzipping'

    tar xfz PhpStorm-2016.1.2.tar.gz

    PHP_STORM_UNZIPPED_DIR=$(ls -d */)
    echo "Fixing rights"

    sudo chown $SUDO_USER:$SUDO_USER $PHP_STORM_UNZIPPED_DIR -R

    echo "installing Phpstorm"

    runuser -l $SUDO_USER -c"bash ${PHPSTORMPATH}/${PHP_STORM_UNZIPPED_DIR}bin/phpstorm.sh"

 

 

2 comments
Comment actions Permalink

Hi there,

AFAIK the license (or JetBrains Account details which has your License details) should be stored together with other IDE-wide settings.

Importing settings does not require launching IDE -- simple copy (or extract from previously archived copy) should be enough (seemed to be enough for me here on Windows when I had to restore them from backup).

https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs

Accordingly to the aforementioned link.. for Linux you need to deal with "~/.PhpStorm2016.1/config" folder (you can safely ignore caches/indexes as it can be regenerated at any time). That's for current 2016.1.x; for next 2016.2 version folder name should be adjusted accordingly.

0
Comment actions Permalink

Thanks for the quick replay, I'll look into it later this evening.

0

Please sign in to leave a comment.