2023-12-17 00:20:33 +01:00
|
|
|
#!/bin/bash
|
|
|
|
if [ ! -f "/sbin/sudo" ]; then
|
|
|
|
echo ":: Error: \"/sbin/sudo\" not found, please install sudo."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ":: Detecting distribution"
|
|
|
|
if [ -f "/etc/os-release" ]; then
|
|
|
|
source /etc/os-release
|
|
|
|
fi
|
|
|
|
case "$ID" in
|
2023-12-17 00:30:13 +01:00
|
|
|
"arch"|"archarm")
|
2023-12-17 00:20:33 +01:00
|
|
|
echo ":: Detected ${PRETTY_NAME}, installing packages automatically"
|
|
|
|
if [ ! -f "/sbin/paru" ]; then
|
|
|
|
echo ":: Error: \"/sbin/paru\" not found, please install paru."
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-02-03 02:53:42 +01:00
|
|
|
if [ "${1}" == "--noconfirm" ]; then
|
|
|
|
export "PARU_FLAGS=--noconfirm"
|
|
|
|
else
|
|
|
|
export "PARU_FLAGS="
|
|
|
|
fi
|
|
|
|
paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp-git tar zstd bzip zip unrar unzip 7-zip binutils ${PARU_FLAGS}
|
2023-12-17 00:20:33 +01:00
|
|
|
rustup default nightly
|
|
|
|
rustup update
|
|
|
|
cargo install eza
|
|
|
|
curl -s "https://get.sdkman.io" | bash
|
|
|
|
export SDKMAN_DIR="$HOME/.sdkman"
|
|
|
|
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
|
|
sdk install java 17.0.9-graal
|
2024-02-19 14:24:08 +01:00
|
|
|
sdk install 8.0.402-tem
|
2023-12-17 00:20:33 +01:00
|
|
|
sdk selfupdate
|
|
|
|
sdk update
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo ":: No supported distribution found."
|
|
|
|
echo " Install these packages manually:"
|
2024-02-03 02:53:42 +01:00
|
|
|
echo " bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp tar zstd gzip bzip zip unrar unzip 7z ['ar' or 'binutils']"
|
|
|
|
echo " Then do this:"
|
|
|
|
echo " 1. Install the nightly rust toolchain and execute \"cargo install eza\""
|
|
|
|
echo " 2. Install sdkman by executing \"curl -s 'https://get.sdkman.io|bash'\""
|
2024-02-19 14:24:08 +01:00
|
|
|
echo " 3. Execute \"sdk install java 17.0.9-graal\" and \"sdk install 8.0.402-tem\""
|
2023-12-17 00:20:33 +01:00
|
|
|
;;
|
|
|
|
esac
|