From 227c83867c0a56fbf292baf83b3ff4a8a22b7214 Mon Sep 17 00:00:00 2001 From: kake26 Date: Fri, 9 Aug 2024 15:03:49 -0500 Subject: [PATCH] Housekeeping resotre had a extra line and a change to restore process --- os_probe.bash | 10 ++++++++++ restore.arch.bash | 6 +++++- restore.deb.bash | 2 +- syssetup.bash | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/os_probe.bash b/os_probe.bash index a01266a..a96a356 100755 --- a/os_probe.bash +++ b/os_probe.bash @@ -26,4 +26,14 @@ fi # I know its so high tech and amazing right? +# We are going to do a double check here using lsb_release + +if [ -x "$(command -v lsb_release)" ]; then + # osp=$(lsb_release -i | awk '{print $3}') +fi + + + + + diff --git a/restore.arch.bash b/restore.arch.bash index 81ef2d0..f1645de 100755 --- a/restore.arch.bash +++ b/restore.arch.bash @@ -30,6 +30,10 @@ function press_enter() { clear } +function pacman() { +command pacman --noconfirm "$@" +} + function restore_config() { cprint 2 "Restoring system..." sleep 1 @@ -42,7 +46,7 @@ function restore_config() { if [ -f ./exclusions ]; then exclusions # this runs exclusions fi - pacman -S - < $aptpkgfile + pacman --noconfirm -S - < $aptpkgfile # we should be set app wise now the configs #cp -Rf etc/ /etc rsync -avh --delete --progress etc/ /etc diff --git a/restore.deb.bash b/restore.deb.bash index 2d55cd1..dbcfd3a 100755 --- a/restore.deb.bash +++ b/restore.deb.bash @@ -50,7 +50,7 @@ function restore_config() { $cpapp -Rf etc/apt/ /etc chown -R _apt /etc/apt apt update - apt upgrade -y + apt full-upgrade -y apt install -y rsync # now the programs installed via apt before we restore configs if [ -f ./exclusions ]; then diff --git a/syssetup.bash b/syssetup.bash index efaca63..522fe1b 100755 --- a/syssetup.bash +++ b/syssetup.bash @@ -73,7 +73,7 @@ function copy_config() { dpkg --get-selections > $tmpdir/installed_packages cp ./restore.deb.bash $tmpdir/restore.bash #apt list --installed | grep ',local]' | awk -F/ '{print $1}' >> $tmpdir/exclusions - apt list --installed | grep -q ',local]' && apt list --installed | grep ',local]' | awk -F/ '{print $1}' >> "$tmpdir/exclusions" + apt list --installed | grep ',local]' | awk -F/ '{print $1}' >> "$tmpdir/exclusions" # best way to do this fi