Compare commits

..

No commits in common. "ccc68c56123c4988014822c52a58492f3ffae062" and "3713396153cc4f210a56d8ca48a6070540020860" have entirely different histories.

3 changed files with 72 additions and 54 deletions

View file

@ -39,7 +39,7 @@ getImports() {
}
init_docker() {
if command_exists docker; then
if command -v docker >/dev/null 2>&1; then
echo_info "Docker was installed correctly. Do you want to add $(whoami) to the docker group? (y/n)"
read -r dgroup </dev/tty
case "$dgroup" in
@ -48,7 +48,7 @@ init_docker() {
;;
esac
sleep 1
run $_sudo systemctl enable --now docker
$_sudo systemctl enable --now docker
echo_info "$(whoami) is now part of the docker group. Restart your session to enable the changes. Also docker was addet as a service. Should autostart from now on."
else
echo_error "Something went wrong!"
@ -57,19 +57,19 @@ init_docker() {
_arch() {
echo_info "executing arch"
sleep 1.3
run _install docker docker-compose --noconfirm
sleep 2
_install docker docker-compose --noconfirm
}
_debian() {
if ! $trixie; then
echo_info "executing debian"
sleep 1.3
run $_sudo apt-get update &&
run $_sudo apt-get install -y ca-certificates curl &&
run $_sudo install -m 0755 -d /etc/apt/keyrings &&
run $_sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc &&
run $_sudo chmod a+r /etc/apt/keyrings/docker.asc &&
sleep 2
$_sudo apt-get update &&
$_sudo apt-get install -y ca-certificates curl &&
$_sudo install -m 0755 -d /etc/apt/keyrings &&
$_sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc &&
$_sudo chmod a+r /etc/apt/keyrings/docker.asc &&
sleep 0.5
if [ "$VERSION_CODENAME" == "trixie" ]; then
VERSION_CODENAME="bookworm"
@ -79,37 +79,37 @@ _debian() {
echo_info "Addet repository. Updating and installing now.."
sleep 1
run $_sudo apt-get update
run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
$_sudo apt-get update
checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
else
echo_info "executing trixie.."
run _install docker.io docker-compose
_install docker.io docker-compose
fi
}
_ubuntu() {
echo_info "executing ubuntu"
sleep 2
run $_sudo apt-get update &&
run $_sudo apt-get install -y ca-certificates curl &&
run $_sudo install -m 0755 -d /etc/apt/keyrings &&
run $_sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc &&
run $_sudo chmod a+r /etc/apt/keyrings/docker.asc
$_sudo apt-get update &&
$_sudo apt-get install -y ca-certificates curl &&
$_sudo install -m 0755 -d /etc/apt/keyrings &&
$_sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc &&
$_sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | $_sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
echo_info "Addet repository. Updating and installing now.."
sleep 0.5
run $_sudo apt-get update
run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
$_sudo apt-get update
checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
}
_fedora() {
echo_info "executing fedora"
sleep 2
run _install dnf-plugins-core
run $_sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
_install dnf-plugins-core
$_sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin"
}
main() {
@ -125,15 +125,25 @@ main() {
if getImports; then
case "$1" in
--silent | -s)
silent=true
echo_warning "Running the script silently.."
echo_warning "Executing silently!"
echo_info "Executing $distro"
case "$distro" in
arch) silentexec _arch ;;
debian) silentexec _debian ;;
ubuntu) silentexec _ubuntu ;;
fedora) silentexec _fedora ;;
*)
echo "$distro is not supported by this script"
exit 1
;;
esac
init_docker
;;
*)
silent=false
if main; then
init_docker
fi
;;
esac
if main; then
init_docker
fi
fi

View file

@ -36,6 +36,14 @@ getImports() {
rm "$import"
}
run(){
if $silent; then
silentexec "$@"
else
"$@"
fi
}
askThings() {
echo_note "Do you want to install hyprland? (y/N)"
read -r askHyprland </dev/tty
@ -92,16 +100,17 @@ instCustom() {
waybar) checkAndInstall waybar ;;
hyprpanel)
case $distro in
arch) run _install ags-hyprpanel-git ;;
arch) _install ags-hyprpanel-git ;;
*) echo_error "Hyprpanel cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
esac
;;
gBar)
case $distro in
arch) run _install gbar-git ;;
arch) _install gbar-git ;;
*) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
esac
;;
;;
esac
}
@ -111,12 +120,12 @@ cloneDotfiles() {
case "$askDotfiles2" in
[pP])
echo_info "Cloning pika's config..."
run git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git "$HOME/git/hyprdots" || { echo_error "Failed to clone dotfiles!" && exit 1; }
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git $HOME/git/hyprdots || echo_error "Failed to clone dotfiles!" && exit 1
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
cd $HOME/git/hyprdots || echo_error "Failed to clone dotfiles!" && exit 1
echo_info "Installing dotfiles..."
make </dev/tty || { echo_error "Failed to install dotfiles!" && exit 1; }
make </dev/tty || echo_error "Failed to install dotfiles!" && exit 1
echo_info "Dotfiles installed successfully!"
;;
@ -124,7 +133,7 @@ cloneDotfiles() {
echo_info "Cloning dotfiles from $askDotfiles2..."
git clone --recursive --depth=1 $askDotfiles2 $HOME/git/hyprdots
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
cd $HOME/git/hyprdots || echo_error "Failed to clone dotfiles!" && exit 1
echo_info "Your dotfiles have been saved to $HOME/git/hyprdots"
echo_info "You can now install your dotfiles how you want to!"
@ -154,23 +163,23 @@ checkConfig() {
main() {
case "$distro" in
arch)
local deps=(
hyprland
hypridle
hyprpolkitagent
hyprland-protocols
wayland-utils
wayland-protocols
wl-clipboard
xdg-desktop-portal-hyprland
)
checkAndInstall "${deps[@]}"
;;
*)
echo "$distro is not supported by this script!"
exit 1
;;
arch)
local deps=(
hyprland
hypridle
hyprpolkitagent
hyprland-protocols
wayland-utils
wayland-protocols
wl-clipboard
xdg-desktop-portal-hyprland
)
checkAndInstall "${deps[@]}"
;;
*)
echo "$distro is not supported by this script!"
exit 1
;;
esac
}

View file

@ -116,7 +116,6 @@
case "$1" in
--silent | -s)
silent=true
echo_warning "Running the script silently.."
;;
*)
silent=false