-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34265f4
commit 18a40ee
Showing
1 changed file
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,49 @@ | ||
#!/bin/bash | ||
|
||
#Defining Variables | ||
downloadlink=https://download-cf.jetbrains.com/python/pycharm-community-2020.3.2.tar.gz | ||
name=pycharm | ||
downloadlink=https://download-cf.jetbrains.com/python/pycharm-community-2020.3.3.tar.gz | ||
name=pycharm-community | ||
|
||
#Installing Dependencies | ||
sudo apt -y install python-pip openjdk-11-jdk | ||
# Get dependencies | ||
sudo apt install python-pip openjdk-11-jdk | ||
|
||
#Removing if pycharm-community-2020.3.2.tar.gz already downloaded | ||
#Removing if pycharm-community-2020.3.3.tar.gz already downloaded | ||
rm $name.tar.gz | ||
|
||
#Removing pycharm-community-2020.3.2 if already extracted | ||
#Removing pycharm-community-2020.3.3 if already extracted | ||
sudo rm -r /opt/$name | ||
|
||
#Downloading pycharm-community-2020.3.2.tar.gz | ||
#Downloading pycharm-community-2020.3.3.tar.gz | ||
wget $downloadlink -O $name.tar.gz | ||
|
||
#Extracting pycharm-community-2020.3.2.tar.gz | ||
#Extracting pycharm-community-2020.3.3.tar.gz to /opt | ||
sudo mkdir /opt/$name | ||
sudo tar xvzf $name.tar.gz -C /opt/$name | ||
sudo mv /opt/$name/*/* /opt/$name/ | ||
|
||
#Deleting pycharm-community-2020.3.2.tar.gz | ||
#Deleting pycharm-community-2020.3.3.tar.gz | ||
rm $name.tar.gz | ||
|
||
#Making file executable | ||
sudo chmod +x /opt/$name/bin/$name.sh | ||
|
||
#Implementing terminal fix | ||
git clone https://github.com/JetBrains/pty4j.git ~/pty4j | ||
cd ~/pty4j/native | ||
gcc -fPIC -c *.c | ||
gcc -shared -o libpty.so *.o | ||
sudo mkdir /opt/$name/lib/pty4j-native/linux/arm | ||
sudo cp libpty.so /opt/$name/lib/pty4j-native/linux/arm | ||
sudo rm -r ~/pty4j | ||
|
||
#Creating desktop shortcut | ||
echo "[Desktop Entry] | ||
Type=Application | ||
Name=$name | ||
Icon=/opt/$name/bin/$name.svg | ||
Exec=/opt/$name/bin/$name.sh %f | ||
Name=PyCharm Community Edition | ||
Icon=/opt/$name/bin/pycharm.svg | ||
Exec=/opt/$name/bin/pycharm.sh %f | ||
Comment=Python IDE for Professional Developers | ||
Categories=Development;IDE; | ||
Terminal=false" > ~/.local/share/applications/$name.desktop | ||
Terminal=false | ||
StartupWMClass=jetbrains-pycharm-ce" > ~/.local/share/applications/jetbrains-pycharm-ce.desktop | ||
|