mirror of
https://github.com/Snigdha-OS/snigdhaos-pkgbuilds.git
synced 2025-09-21 20:14:59 +02:00
@eshanized pushed another commit via script 🔥🔥🔥
This commit is contained in:
@@ -3,6 +3,7 @@ set -e
|
|||||||
|
|
||||||
init_logging(){
|
init_logging(){
|
||||||
if [ ! -d /var/log/snigdhaos/ ]; then
|
if [ ! -d /var/log/snigdhaos/ ]; then
|
||||||
|
# shellcheck disable=SC2174
|
||||||
mkdir -p -m 755 /var/log/snigdhaos/
|
mkdir -p -m 755 /var/log/snigdhaos/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ parse_pacman_log(){
|
|||||||
"invalid or corrupted package"*)
|
"invalid or corrupted package"*)
|
||||||
RETRY="Snigdha OS Updater Found Corrupted Packages😑. Retying..."
|
RETRY="Snigdha OS Updater Found Corrupted Packages😑. Retying..."
|
||||||
CUSTOM_PACMAN_CONFIG="$(mktemp)"
|
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"
|
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")
|
pacman_args+=("--config" "$CUSTOM_PACMAN_CONFIG")
|
||||||
;;
|
;;
|
||||||
@@ -66,6 +68,7 @@ update_mirrorlist(){
|
|||||||
|
|
||||||
if COUNT="$(grep -Ec "^Server *=" "$MIRRORLIST_TEMP")" && [ "$COUNT" -ge "$MINLINES" ]; then
|
if COUNT="$(grep -Ec "^Server *=" "$MIRRORLIST_TEMP")" && [ "$COUNT" -ge "$MINLINES" ]; then
|
||||||
install -m644 "$MIRRORLIST_TEMP" /etc/pacman.d/mirrorlist
|
install -m644 "$MIRRORLIST_TEMP" /etc/pacman.d/mirrorlist
|
||||||
|
# shellcheck disable=SC2034
|
||||||
DATABASE_UPDATED="force"
|
DATABASE_UPDATED="force"
|
||||||
else
|
else
|
||||||
echo -e "\033[0;31Mirror Count Not Satisfied!\033[0m"
|
echo -e "\033[0;31Mirror Count Not Satisfied!\033[0m"
|
||||||
@@ -117,3 +120,8 @@ show_changelog(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -f /etc/snigdhaos/snigdhaos-updater/config ]; then
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source /etc/snigdhaos/snigdhaos-updater/config
|
||||||
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user