From 2988d5b46314323957f09949be4ad2171e7310aa Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Sun, 28 May 2023 17:05:24 +0300 Subject: [PATCH] Upgrade packages before run --- run_once_before_install_main_deps.sh.tmpl | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/run_once_before_install_main_deps.sh.tmpl b/run_once_before_install_main_deps.sh.tmpl index 3731849..c90f47b 100644 --- a/run_once_before_install_main_deps.sh.tmpl +++ b/run_once_before_install_main_deps.sh.tmpl @@ -7,6 +7,28 @@ NC='\033[0m' # No Color echo -e " +$Green############################################################################### +## ## +## Update caches and upgrade packages ## +## ## +###############################################################################$NC" +sleep 3 + +{{ if eq .chezmoi.os "linux" -}} + {{ if eq .chezmoi.osRelease.id "fedora" -}} + sudo dnf update -y + + {{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}} + sudo apt update + sudo apt upgrade -y + + {{ end -}} +{{ end -}} + + +echo -e " + + $Green############################################################################### ## ## ## Install base packages ## @@ -19,7 +41,6 @@ sleep 3 sudo dnf install $BASE_PACKAGES util-linux-user -y {{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}} - sudo apt update sudo apt install $BASE_PACKAGES -y {{ end -}}