|
@ -64,17 +64,22 @@ REQUIRED_PACKAGES=( |
|
|
|
|
|
|
|
|
echo "# configure apt sources to the mithril's" |
|
|
echo "# configure apt sources to the mithril's" |
|
|
echo "========================================" |
|
|
echo "========================================" |
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
echo "# updating repositories" |
|
|
|
|
|
echo "===================" |
|
|
|
|
|
if [[ $(date --date='-12 hours' +%s) -gt $(date -d "$(stat -c %y /var/lib/apt/lists/partial)" +%s) ]]; then |
|
|
|
|
|
|
|
|
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 update |
|
|
sudo apt autoremove -y |
|
|
sudo apt autoremove -y |
|
|
else |
|
|
else |
|
|
|
|
|
echo "# updating repositories" |
|
|
|
|
|
echo "===================" |
|
|
|
|
|
if [[ $(date --date='-12 hours' +%s) -gt $(date -d "$(stat -c %y /var/lib/apt/lists/partial)" +%s) ]]; then |
|
|
|
|
|
sudo apt update |
|
|
|
|
|
sudo apt autoremove -y |
|
|
|
|
|
else |
|
|
echo "repositories recently updated!" |
|
|
echo "repositories recently updated!" |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
echo "# required packages" |
|
|
echo "# required packages" |
|
|