Browse Source

fix mithril.re repositories on fresh install

bookworm
pvincent 2 years ago
parent
commit
205864cebc
  1. 7
      src/main

7
src/main

@ -64,10 +64,14 @@ REQUIRED_PACKAGES=(
echo "# configure apt sources to the mithril's"
echo "========================================"
if ! grep -q debian.mithril.re /etc/apt/sources.list; then
echo "deb http://debian.mithril.re/debian bullseye main contrib non-free" | sudo tee /etc/apt/sources.list
echo "deb http://debian.mithril.re/debian bullseye-updates main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://debian.mithril.re/debian-security/ bullseye-security main contrib non-free" | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt autoremove -y
else
echo "# updating repositories"
echo "==================="
if [[ $(date --date='-12 hours' +%s) -gt $(date -d "$(stat -c %y /var/lib/apt/lists/partial)" +%s) ]]; then
@ -76,6 +80,7 @@ if [[ $(date --date='-12 hours' +%s) -gt $(date -d "$(stat -c %y /var/lib/apt/li
else
echo "repositories recently updated!"
fi
fi
echo "# required packages"
echo "==================="

Loading…
Cancel
Save