summaryrefslogtreecommitdiff
path: root/rootfs/samizdat-update-apt-cache.sh
blob: 01c59fa7d8bf03469404859560c0777640ebadb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# TODO: Write this in fsmgr

. /etc/os-release

cat <<END > /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

set -- /var/lib/apt/lists/*_Packages
if [ -f "$1" ]
then
    apt-get update || exit
    apt-cache dumpavail | dpkg --update-avail -
else
    false
fi