From 6473a886034d6fd16ab3327e3bfe8fa9a13eed06 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sat, 30 May 2020 12:17:42 -0400 Subject: patchroot.sh: download less (but still some, for demonstration) --- patchroot.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) mode change 100644 => 100755 patchroot.sh diff --git a/patchroot.sh b/patchroot.sh old mode 100644 new mode 100755 index 2345f77..76eb26a --- a/patchroot.sh +++ b/patchroot.sh @@ -5,14 +5,19 @@ sed -i -e 's/\blocalhost\b/& '"$hostname"'/' /etc/hosts . /etc/os-release +# TODO: Write this in fsmgr cat < /etc/apt/sources.list deb http://httpredir.debian.org/debian ${VERSION_CODENAME} main #contrib non-free deb http://security.debian.org ${VERSION_CODENAME}/updates main #contrib non-free #deb http://httpredir.debian.org/debian ${VERSION_CODENAME}-backports main #contrib non-free END -#apt-get update -cat /var/lib/apt/lists/*_Packages | dpkg --update-avail - - -#apt-get -yd install baresip -apt-mark install baresip +set -- /var/lib/apt/lists/*_Packages +if [ -f "$1" ] +then + # apt database validity demonstration + apt-get update + apt-cache dumpavail | dpkg --update-avail - + apt-get -yd install iso-codes # baresip + apt-mark install baresip +fi -- cgit v1.2.3