apt restore fix for missing pkgs

This commit is contained in:
kake26 2024-02-21 17:21:07 -06:00
parent 6b922531b7
commit 3447eabd1b
2 changed files with 20 additions and 6 deletions

View file

@ -1,12 +1,17 @@
#!/bin/bash
source ./os_probe.bash
aptpkgfile="installed_packages"
apt install -s -y $(cat $aptpkgfile | awk '{print $1}')
# check for error
if [ "$osp" = "Debian" ]; then
echo "Debian"
if [ $? -ne 0 ]; then
cat installed_packages | awk '{print $1}' | while read -r package; do
apt install -q -s -y $package
done
fi
if [ "$osp" = "Arch" ]; then
echo "Arch"
fi
#cat installed_packages | awk '{print $1}' | while read -r package; do
# apt install -q -s -y $package
#done