diff --git a/scripts-download.sh b/scripts-download.sh index 0845c36..51b803f 100644 --- a/scripts-download.sh +++ b/scripts-download.sh @@ -63,8 +63,6 @@ process_running() { # Detect the operating system detect_operating_system() { - log_info "Detecting operating system..." - if command_exists apk; then echo "Alpine" elif command_exists apt; then @@ -108,6 +106,8 @@ install_packages() { apk add --no-cache "${packages[@]}" >/dev/null || die "Failed to install packages via APK" ;; "Debian") + log_info "Ensuring /var/cache/apt/archives/partial exists..." + mkdir -p /var/cache/apt/archives/partial || die "Failed to create /var/cache/apt/archives/partial" log_info "Updating APT package index..." apt-get update -y >/dev/null || die "Failed to update APT package index" @@ -257,6 +257,7 @@ main() { echo # System detection and validation + log_info "Detecting operating system..." local detected_os detected_os=$(detect_operating_system) detected_os=$(echo "$detected_os" | tr -d '\n\r' | xargs) # Clean any whitespace/newlines