mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-20 22:34:28 +05:00
refactor: update package lists only when stale (#346)
Co-authored-by: th33xitus <th33xitus@googlemail.com>
This commit is contained in:
@@ -141,7 +141,7 @@ function moonraker_setup_dialog() {
|
||||
}
|
||||
|
||||
function install_moonraker_dependencies() {
|
||||
local packages
|
||||
local packages log_name="Moonraker"
|
||||
local install_script="${MOONRAKER_DIR}/scripts/install-moonraker.sh"
|
||||
|
||||
### read PKGLIST from official install-script
|
||||
@@ -152,21 +152,11 @@ function install_moonraker_dependencies() {
|
||||
echo "${cyan}${packages}${white}" | tr '[:space:]' '\n'
|
||||
read -r -a packages <<< "${packages}"
|
||||
|
||||
### Update system package info
|
||||
status_msg "Updating package lists..."
|
||||
if ! sudo apt-get update --allow-releaseinfo-change; then
|
||||
log_error "failure while updating package lists"
|
||||
error_msg "Updating package lists failed!"
|
||||
exit 1
|
||||
fi
|
||||
### Update system package lists if stale
|
||||
update_system_package_lists
|
||||
|
||||
### Install required packages
|
||||
status_msg "Installing required packages..."
|
||||
if ! sudo apt-get install --yes "${packages[@]}"; then
|
||||
log_error "failure while installing required moonraker packages"
|
||||
error_msg "Installing required packages failed!"
|
||||
exit 1
|
||||
fi
|
||||
install_system_packages "${log_name}" "packages[@]"
|
||||
}
|
||||
|
||||
function create_moonraker_virtualenv() {
|
||||
|
||||
Reference in New Issue
Block a user