diff --git a/restore.deb.bash b/restore.deb.bash index 7383f77..b0b67f3 100755 --- a/restore.deb.bash +++ b/restore.deb.bash @@ -37,6 +37,8 @@ function restore_config() { if [ -f ./exclusions ]; then exclusions # this runs exclusions fi + mkfast_deb # speed up this process + # Novel idea but not good for errors: apt install -y $(cat $aptpkgfile | awk '{print $1}') apt install -y $(cat $aptpkgfile | awk '{print $1}') # check for error diff --git a/restore.lib.bash b/restore.lib.bash index 6d7f6f2..db0adbc 100644 --- a/restore.lib.bash +++ b/restore.lib.bash @@ -8,4 +8,13 @@ function exclusions () { mv installed_packages installed_packages.orig grep -vf exclusions installed_packages.orig > installed_packages +} + +function mkfast_deb () { + + # we must check for packages already installed so we don't waste time reinstalling them + + dpkg --get-selections > installed_packages_fast + grep -vf installed_packages_fast installed_packages > installed_packages + } \ No newline at end of file