apt restore fix for missing pkgs
This commit is contained in:
parent
6b922531b7
commit
3447eabd1b
2 changed files with 20 additions and 6 deletions
|
@ -37,7 +37,16 @@ function restore_config() {
|
||||||
if [ -f ./exclusions ]; then
|
if [ -f ./exclusions ]; then
|
||||||
exclusions # this runs exclusions
|
exclusions # this runs exclusions
|
||||||
fi
|
fi
|
||||||
|
# Novel idea but not good for errors: apt install -y $(cat $aptpkgfile | awk '{print $1}')
|
||||||
apt install -y $(cat $aptpkgfile | awk '{print $1}')
|
apt install -y $(cat $aptpkgfile | awk '{print $1}')
|
||||||
|
# check for error
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
cat installed_packages | awk '{print $1}' | while read -r package; do
|
||||||
|
apt install -y $package
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# we should be set app wise now the configs
|
# we should be set app wise now the configs
|
||||||
cp -R etc/ /etc
|
cp -R etc/ /etc
|
||||||
cprint 3 "You may want to reboot for changes to take effect"
|
cprint 3 "You may want to reboot for changes to take effect"
|
||||||
|
|
17
test.bash
17
test.bash
|
@ -1,12 +1,17 @@
|
||||||
#!/bin/bash
|
#!/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
|
if [ $? -ne 0 ]; then
|
||||||
echo "Debian"
|
cat installed_packages | awk '{print $1}' | while read -r package; do
|
||||||
|
apt install -q -s -y $package
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$osp" = "Arch" ]; then
|
#cat installed_packages | awk '{print $1}' | while read -r package; do
|
||||||
echo "Arch"
|
# apt install -q -s -y $package
|
||||||
fi
|
#done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue