Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 5 additions & 28 deletions postinst/admin/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ check_java() {
local version cmd="java"
echo -n "Checking $cmd ($(which $cmd))... "
version="$($cmd --version | head -1 | grep -Po "\d+\.\d+\.\d+")"
check_version "$version" "17.0.12"
check_version "$version" "17.0.17"
}

check_python() {
Expand Down Expand Up @@ -97,14 +97,14 @@ check_sublime_text() {
local version cmd="subl"
echo -n "Checking $cmd ($(which $cmd))... "
version="$($cmd --version | grep -Po "\d+$")"
check_version "$version" "4180"
check_version "$version" "4200"
}

check_vscode() {
local version cmd="code"
echo -n "Checking $cmd ($(which $cmd))... "
version="$($cmd --version --no-sandbox --user-data-dir /tmp | grep -Po "^\d+\.\d+\.\d+$")"
check_version "$version" "1.94.2"
check_version "$version" "1.106.3"
}

check_gedit() {
Expand All @@ -127,7 +127,7 @@ check_pycharm() {
cmd="$(find /opt/pycharm-*/bin/pycharm.sh)"
echo -n "$(which $cmd))... "
version="$($cmd --version | grep "PyCharm" | grep -Po "\d+\.\d+\.\d+")"
check_version "$version" "2023.3.3"
check_version "$version" "2025.2.4"
}

check_intellij() {
Expand All @@ -136,7 +136,7 @@ check_intellij() {
cmd="$(find /opt/idea-*/bin/idea.sh)"
echo -n "$(which $cmd))... "
version="$($cmd --version | grep "IntelliJ" | grep -Po "\d+\.\d+\.\d+")"
check_version "$version" "2023.3.4"
check_version "$version" "2025.2.5"
}

check_packages() {
Expand All @@ -155,27 +155,6 @@ check_packages() {
check_intellij
}

update_users() {
echo -n "Updating users... "

ADMIN_USER="admin"
ADMIN_PASS='$1$Rd490TmZ$kTNwQiGJFah4t/NRqUd1e1' # openssl passwd -1 -salt Rd490TmZ 'PLAINTEXT'
run_as_root usermod --password $(echo $ADMIN_PASS) "$ADMIN_USER"
run_as_root getent shadow "$ADMIN_USER" | cut -d':' -f2 | grep -q $(echo $ADMIN_PASS)

TEAM_USER="main"
TEAM_PASS='$1$Rd490TmZ$MDQCGg2d6Q1sJrg80UViF0' # openssl passwd -1 -salt Rd490TmZ 'PLAINTEXT'
run_as_root usermod --password $(echo $TEAM_PASS) "$TEAM_USER"
run_as_root getent shadow "$TEAM_USER" | cut -d':' -f2 | grep -q $(echo $TEAM_PASS)

MOCK_USER="mock"
MOCK_PASS='$1$Rd490TmZ$/CEXDyrKsM6Ylw6TuWum6.' # openssl passwd -1 -salt Rd490TmZ 'mock'
run_as_root usermod --password $(echo $MOCK_PASS) "$MOCK_USER"
run_as_root getent shadow "$MOCK_USER" | cut -d':' -f2 | grep -q $(echo $MOCK_PASS)

echo "DONE"
}

enable_ssh() {
echo -n "Starting ssh... "

Expand All @@ -191,6 +170,4 @@ enable_ssh() {
update_packages
check_packages

update_users

enable_ssh
3 changes: 3 additions & 0 deletions scripts/add_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -eux

# https://askubuntu.com/questions/593433/error-sudo-add-apt-repository-command-not-found
apt update && apt install -y software-properties-common

echo "Enabling universe repo.."
add-apt-repository -y universe

Expand Down
4 changes: 2 additions & 2 deletions scripts/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ echo "Installing VS Code ..."

apt install -y wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
install -D -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/microsoft.gpg
sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg

apt install -y apt-transport-https
Expand Down
2 changes: 1 addition & 1 deletion scripts/eclipse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eux

ECLIPSE_VERSION="2024-09"
ECLIPSE_VERSION="2025-09"

# download eclipse: https://www.eclipse.org/downloads/packages/
wget -c -O "eclipse.tar.gz" \
Expand Down
4 changes: 2 additions & 2 deletions scripts/google_chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -eux

echo "Installing Google Chrome.."

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb || apt-get install -f -y
rm -v google-chrome-stable_current_amd64.deb
2 changes: 1 addition & 1 deletion scripts/intellij_idea_community.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eux

IDEA_VERSION='2023.3.4'
IDEA_VERSION='2025.2.5'

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

Expand Down
2 changes: 1 addition & 1 deletion scripts/pycharm_community.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eux

PYCHARM_VERSION="2023.3.3"
PYCHARM_VERSION="2025.2.4"
PYCHARM_NAME="pycharm-community-${PYCHARM_VERSION}"

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