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
|
2024-05-20 13:18:42 +02:00
|
|
|
"arch")
|
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
|
2024-03-15 03:06:39 +01:00
|
|
|
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 selfupdate
|
|
|
|
sdk update
|
2024-05-19 21:04:12 +02:00
|
|
|
java_versions=( '22.0.1' '21.0.3' '17.0.11' '8.0.412' )
|
|
|
|
for version in "${java_versions[@]}"; do
|
|
|
|
sdk install java "${version}-tem"
|
|
|
|
done
|
|
|
|
sdk default java 21.0.3-tem
|
2023-12-17 00:20:33 +01:00
|
|
|
;;
|
2024-05-20 13:18:42 +02:00
|
|
|
"archarm")
|
|
|
|
echo ":: Arch Linux ARM is not yet supported"
|
|
|
|
echo " (but will soon be). Just wait a little!"
|
|
|
|
;;
|
2023-12-17 00:20:33 +01:00
|
|
|
*)
|
|
|
|
echo ":: No supported distribution found."
|
2024-05-19 21:04:12 +02:00
|
|
|
echo " Please create an issue and (if you want)"
|
|
|
|
echo " look into the source code and install"
|
|
|
|
echo " the packages and programs yourself."
|
2023-12-17 00:20:33 +01:00
|
|
|
;;
|
|
|
|
esac
|