Skip to content

Commit

Permalink
feat: add vim, sublime, emacs, openjdk (w jre), intellij, pycharm, ge…
Browse files Browse the repository at this point in the history
…any (#2)

This commit adds a bunch of editors, IDEs and one language support.

Editors:
- Vim
- Sublime Text 4
- GNU Emacs

IDEs:
- IntelliJ IDEA (community, Java)
- PyCharm (community, Python)
- Geany (C, C++)

Language Support:
- Java
  - OpenJDK 17 (jdk, jre)

---------

Co-authored-by: Rafid Bin Mostofa <[email protected]>
  • Loading branch information
mahdihasnat and rebornplusplus authored Jul 29, 2023
1 parent 3800f22 commit bad2343
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/emacs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set -eux

echo "\nInstalling Emacs ...\n"
apt install -y emacs
echo "\nPrinting Emacs version ...\n"
emacs --version
6 changes: 6 additions & 0 deletions scripts/geany.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set -eux

echo "\nInstalling Geany ...\n"
apt install -y geany
echo "\nPrinting Geany version ...\n"
geany --version
40 changes: 40 additions & 0 deletions scripts/intellij_idea_community.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

set -eux

IDEA_VERSION='2023.2'
echo "\nInstalling IntelliJ IDEA Community Edition $IDEA_VERSION ...\n"

# download pycharm community edition
wget -c "https://download.jetbrains.com/idea/ideaIC-$IDEA_VERSION.tar.gz"

# download sha256sum file and verify the checksum
wget "https://download.jetbrains.com/idea/ideaIC-$IDEA_VERSION.tar.gz.sha256" -O expected_sha256sum.txt
sha256sum ideaIC-$IDEA_VERSION.tar.gz >> actual_sha256sum.txt
cat actual_sha256sum.txt | sha256sum -c expected_sha256sum.txt

# extract and keep the files in /opt
mkdir idea-ce-$IDEA_VERSION
tar -zxvf "ideaIC-$IDEA_VERSION.tar.gz" -C idea-ce-$IDEA_VERSION --strip-components 1
mv idea-ce-$IDEA_VERSION /opt

# remove tar and hash files
rm "ideaIC-$IDEA_VERSION.tar.gz" actual_sha256sum.txt expected_sha256sum.txt

# populate desktop entry
cat > jetbrains-idea-ce.desktop << EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Community Edition
Icon=/opt/idea-ce-$IDEA_VERSION/bin/idea.svg
Exec="/opt/idea-ce-$IDEA_VERSION/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea-ce
StartupNotify=true
EOF

# copy the desktop entry to appropriate location
mv jetbrains-idea-ce.desktop /usr/share/applications/
8 changes: 8 additions & 0 deletions scripts/openjdk17.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -eux

echo "\nInstalling OpenJDK 17 ...\n"
apt install -y openjdk-17-jdk openjdk-17-jre
echo "\nPrinting Java version ...\n"
java --version
echo "\nPrinting Java compiler version ...\n"
javac --version
42 changes: 42 additions & 0 deletions scripts/pycharm_community.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -eux

PYCHARM_VERSION="2023.1.4"
PYCHARM_NAME="pycharm-community-${PYCHARM_VERSION}"

echo "\nInstall Pycharm Community $PYCHARM_VERSION ..\n"

# download pycharm community edition
# wget "data.services.jetbrains.com/products/download?code=PCC&platform=linux" -O pycharm.tar.gz
wget -c "https://download.jetbrains.com/python/pycharm-community-${PYCHARM_VERSION}.tar.gz"

# download sha256sum file and verify the checksum
wget "https://download.jetbrains.com/python/pycharm-community-${PYCHARM_VERSION}.tar.gz.sha256" -O expected_sha256sum.txt
sha256sum pycharm-community-${PYCHARM_VERSION}.tar.gz >> actual_sha256sum.txt
cat actual_sha256sum.txt | sha256sum -c expected_sha256sum.txt

# extract and keep the files in /opt
tar -zxvf "pycharm-community-${PYCHARM_VERSION}.tar.gz"
mv "pycharm-community-${PYCHARM_VERSION}" /opt

# remove tar and hash files
rm "pycharm-community-${PYCHARM_VERSION}.tar.gz" actual_sha256sum.txt expected_sha256sum.txt

# populate desktop entry
cat > jetbrains-pycharm-ce.desktop << EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/opt/$PYCHARM_NAME/bin/pycharm.svg
Exec="/opt/$PYCHARM_NAME/bin/pycharm.sh" %f
Comment=Python IDE for Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm
StartupNotify=true
EOF

# copy the desktop entry to appropriate location
mv jetbrains-pycharm-ce.desktop /usr/share/applications/
7 changes: 7 additions & 0 deletions scripts/run_order.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ add_repo.sh
google_chrome.sh
gcc_10.sh
python3.10.sh
openjdk17.sh
openssh_server.sh
code.sh
codeblocks.sh
pycharm_community.sh
intellij_idea_community.sh
sublime.sh
vim.sh
emacs.sh
geany.sh
dist_upgrade.sh
copy_dots.sh
add_users.sh
Expand Down
13 changes: 13 additions & 0 deletions scripts/sublime.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set -eux

# https://www.sublimetext.com/docs/linux_repositories.html#apt
echo "\nInstalling Sublime Text 4 ...\n"
apt install -y wget gpg
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor >> /etc/apt/trusted.gpg.d/sublimehq-archive.gpg
echo "deb https://download.sublimetext.com/ apt/stable/" >> /etc/apt/sources.list.d/sublime-text.list
apt update
apt install -y apt-transport-https
apt install -y sublime-text

echo "\nPrinting Sublime Text version ...\n"
subl --version
6 changes: 6 additions & 0 deletions scripts/vim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set -eux

echo "\nInstalling Vim ...\n"
apt install -y vim-gtk3
echo "\nPrinting Vim version ...\n"
vim --version

0 comments on commit bad2343

Please sign in to comment.