Update apt package lists during bootstrap

This commit is contained in:
2021-10-02 12:28:37 +02:00
parent df1edce5c6
commit f80e24cc28

View File

@@ -47,9 +47,14 @@ sudowrap() {
fi
}
cache_updated=0
_install() {
_package="$1" ; shift
if [[ $NAME == "Ubuntu" ]] ; then
if ! (( cache_updated )) ; then
apt-get update
cache_updated=1
fi
sudowrap apt-get install --assume-yes "${_package}"
elif [[ $NAME == "Arch Linux" ]] ; then
sudowrap pacman -S --noconfirm "${_package}"