From 6746746a3393cae79e7a1977fb9c3e2ed6ed8e7e Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 19 May 2025 10:14:44 +0200 Subject: [PATCH] wip --- distros.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/distros.sh b/distros.sh index 62f9fee..f7441c9 100755 --- a/distros.sh +++ b/distros.sh @@ -400,7 +400,10 @@ update_package_list() { ;; opensuse) run $_sudo zypper ref ;; alpine) run $_sudo apk update ;; - *) echo_error "Unsupported distribution: ${BRIGHT_RED}$distro" ;; + *) + echo_error "Unsupported distribution: ${BRIGHT_RED}$distro" + return 69 + ;; esac } @@ -408,11 +411,17 @@ if check_env; then get_packager dist_setup + # WHY: + # ╭─────────────────────────────────────────────────────────────────────────╮ + # │ check if the script has run at least once, so that the sources dont │ + # │ have to get updated again.. │ + # ╰─────────────────────────────────────────────────────────────────────────╯ if [[ -z "$PIKA_INIT" ]]; then echo_pkg "First time being imported.." - touch "$pikaCheckFile" - update_package_list + if update_package_list; then + touch "$pikaCheckFile" + fi else echo_note "Skipping repo refresh (PIKA_INIT is already set)" fi