From b00ff7426bd0e27a7ca07eaa2487d27ea2fe123e Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 15:16:07 +0200 Subject: [PATCH 1/3] changed docker stuff --- docker.sh | 70 ++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/docker.sh b/docker.sh index 6341276..2faf206 100644 --- a/docker.sh +++ b/docker.sh @@ -39,7 +39,7 @@ getImports() { } init_docker() { - if command -v docker >/dev/null 2>&1; then + if command_exists docker; then echo_info "Docker was installed correctly. Do you want to add $(whoami) to the docker group? (y/n)" read -r dgroup /dev/null echo_info "Addet repository. Updating and installing now.." sleep 0.5 - $_sudo apt-get update - checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin" + run $_sudo apt-get update + run checkAndInstall "docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin" } _fedora() { echo_info "executing fedora" sleep 2 - _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" + 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" } main() { @@ -125,25 +125,15 @@ main() { if getImports; then case "$1" in --silent | -s) - 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=true + echo_warning "Running the script silently.." ;; *) - if main; then - init_docker - fi + silent=false ;; esac + + if main; then + init_docker + fi fi From 28c47335053b937bb7a99eef8282bd181085823c Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 15:16:38 +0200 Subject: [PATCH 2/3] standardization process --- pkgui.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgui.sh b/pkgui.sh index 6e7715b..f783d15 100644 --- a/pkgui.sh +++ b/pkgui.sh @@ -116,6 +116,7 @@ case "$1" in --silent | -s) silent=true + echo_warning "Running the script silently.." ;; *) silent=false From ccc68c56123c4988014822c52a58492f3ffae062 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 15:17:10 +0200 Subject: [PATCH 3/3] maybe i broke it :) --- hyprland.sh | 55 ++++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/hyprland.sh b/hyprland.sh index 8d18900..90c22fb 100644 --- a/hyprland.sh +++ b/hyprland.sh @@ -36,14 +36,6 @@ getImports() { rm "$import" } -run(){ - if $silent; then - silentexec "$@" - else - "$@" - fi -} - askThings() { echo_note "Do you want to install hyprland? (y/N)" read -r askHyprland