From 06bdc97b5791a08de6e7d46b5124866a6a6e4a7f Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Sat, 9 Mar 2024 04:00:35 +0530 Subject: [PATCH] =?UTF-8?q?@eshanized=20pushed=20another=20commit=20via=20?= =?UTF-8?q?script=20=F0=9F=94=A5=F0=9F=94=A5=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/snigdhaos-updater/core-script | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/snigdhaos-updater/core-script b/common/snigdhaos-updater/core-script index 23cc4a2f..7f6fc3fe 100644 --- a/common/snigdhaos-updater/core-script +++ b/common/snigdhaos-updater/core-script @@ -3,6 +3,7 @@ set -e init_logging(){ if [ ! -d /var/log/snigdhaos/ ]; then + # shellcheck disable=SC2174 mkdir -p -m 755 /var/log/snigdhaos/ fi @@ -18,6 +19,7 @@ parse_pacman_log(){ "invalid or corrupted package"*) RETRY="Snigdha OS Updater Found Corrupted Packages😑. Retying..." CUSTOM_PACMAN_CONFIG="$(mktemp)" + # shellcheck disable=SC2016 sed 's|Include = /etc/pacman.d/chaotic-mirrorlist|Server = https://cdn-mirror.chaotic.cx/$repo/$arch|g' /etc/pacman.conf > "$CUSTOM_PACMAN_CONFIG" pacman_args+=("--config" "$CUSTOM_PACMAN_CONFIG") ;; @@ -66,6 +68,7 @@ update_mirrorlist(){ if COUNT="$(grep -Ec "^Server *=" "$MIRRORLIST_TEMP")" && [ "$COUNT" -ge "$MINLINES" ]; then install -m644 "$MIRRORLIST_TEMP" /etc/pacman.d/mirrorlist + # shellcheck disable=SC2034 DATABASE_UPDATED="force" else echo -e "\033[0;31Mirror Count Not Satisfied!\033[0m" @@ -117,3 +120,8 @@ show_changelog(){ fi } +if [ -f /etc/snigdhaos/snigdhaos-updater/config ]; then + # shellcheck disable=SC1091 + source /etc/snigdhaos/snigdhaos-updater/config +fi +