diff --git a/dream.sh b/dream.sh index 770f559..4c16f5c 100644 --- a/dream.sh +++ b/dream.sh @@ -163,7 +163,7 @@ check_env() { # echo_info "User is not root. Using sudo for privileged operations." _sudo="sudo -E" else - echo_error "No sudo found and you're not root! Can't install packages." + echo-error "No sudo found and you're not root! Can't install packages." return 69 fi else @@ -558,25 +558,6 @@ update-package-list() { esac } -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 - pen bold grey "First time importing.." - - if update-package-list; then - silentexec touch "$pikaCheckFile" - fi - else - echo_pkg "Skipping repo refresh" - fi -fi # NOTE: # ────────────────────────────────────< end distros.sh >──────────────────────────────────── # ───────────────────────────────────────< beddu.sh >─────────────────────────────────────── @@ -921,3 +902,23 @@ seek() { } # NOTE: # ──────────────────────────────────────< end beddu >──────────────────────────────────── + +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 + pen bold grey "First time importing.." + + if update-package-list; then + silentexec touch "$pikaCheckFile" + fi + else + echo_pkg "Skipping repo refresh" + fi +fi