Last active
April 6, 2016 20:06
-
-
Save clbarnes/8ed7c69a21b39582728fae074be7475e to your computer and use it in GitHub Desktop.
Requires sudo. Change username where indicated. Usage is `install_pycharm path/to/pycharm_archive.tar.gz`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| USERNAME = "cbarnes" # change this | |
| COMPRESSION = ".tar.gz" | |
| STARTING_DIR = pwd | |
| ARCHIVE_DIR = dirname $1 | |
| FOLDER_NAME = basename $1 $COMPRESSION | |
| cd $ARCHIVE_DIR | |
| tar -xzvf $1 | |
| mv $FOLDER_NAME "/opt/" | |
| chmod 777 -R "/opt/$FOLDER_NAME" # allow pycharm to update itself | |
| cd $STARTING_DIR | |
| echo "Remember to import settings, and create a desktop shortcut!" | |
| sudo -u $USERNAME "/opt/$FOLDER_NAME/bin/pycharm.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment