The recommended way to update

Clicking the update button downloads a new 4.0.4, but what do I do next.  

This is what I'm thinking of doing: The old executable is in /opt/pycharm-4.0, and I have created a new directory /opt/pycharm-4.0.4.  The script for executing pycharm is in /usr/local/zacktu/pycharm.  I can change the script's RUN_PATH to point to /opt/pycharm-4.0.4/bin/  What about CONFIG_FILE?  Can I leave CONFIG_FILE to point to /home/zacktu/.PyCharm40/config?

I've always found the Jetbrains products to be the simplest to install, this is the method that I used for all their products that I use.

  • Extract the archive into /opt
  • Create (or overwrite) a soft link to the new directory for that product ln -snf /opt/product-123.321 /opt/product
  • Use /opt/product in your script's RUN_PATH so that you never need to worry about changing it.

So, for Pycharm 4.0.4, you extract the archive into /opt/pycharm-4.0.4; execute ln -snf /opt/pycharm-4.0.4 /opt/pycharm and then modify your script to use /opt/pycharm .  Remember to do this each time and you won't need to edit your script any further.

For your information, the options that I've suggested that you pass to ln mean:
  • s — Create a symbolic link
  • n — Do not derefererence if the target exists and is a link to a directory
  • f — Force the removal of the target before creating the link
If you do not use all of these options then your results will not be as expected after the first occasion.

I hope this has helped.

Thank you very much, Geoff.

Please sign in to leave a comment.