refactor
This commit is contained in:
@@ -22,8 +22,9 @@ _apt_update() {
|
||||
}
|
||||
|
||||
_dpkg_avail_hack() {
|
||||
: "${DPKG_ADMINDIR:=/var/lib/dpkg}"
|
||||
VERSION_CODENAME=$(. /etc/os-release ; printf '%s' "${VERSION_CODENAME}") || :
|
||||
f="${DPKG_ADMINDIR:-/var/lib/dpkg}/available"
|
||||
f="${DPKG_ADMINDIR}/available"
|
||||
# if ${VERSION_CODENAME} is empty then we're on Debian sid or so :)
|
||||
case "${VERSION_CODENAME}" in
|
||||
stretch | buster | bionic | focal )
|
||||
@@ -31,7 +32,7 @@ _dpkg_avail_hack() {
|
||||
if [ -s "$f" ] ; then
|
||||
return
|
||||
fi
|
||||
/usr/lib/dpkg/methods/apt/update "${DPKG_ADMINDIR:-/var/lib/dpkg}" apt apt
|
||||
/usr/lib/dpkg/methods/apt/update "${DPKG_ADMINDIR}" apt apt
|
||||
;;
|
||||
* )
|
||||
touch "$f"
|
||||
|
Reference in New Issue
Block a user