Skip to content

Instantly share code, notes, and snippets.

@mrckndt
Last active April 11, 2024 14:18
Show Gist options
  • Save mrckndt/4792647e0cc783d5eb233b7845b819f0 to your computer and use it in GitHub Desktop.
Save mrckndt/4792647e0cc783d5eb233b7845b819f0 to your computer and use it in GitHub Desktop.
Zoom local APT repo
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
zoom_deburl=https://zoom.us/client/latest/zoom_amd64.deb
debdir=/var/local/cache/apt/zoom
aptconf=/etc/apt/apt.conf.d/100update_zoom_localrepo
sourceslist=/etc/apt/sources.list.d/zoom_localrepo.list
sudo mkdir -p "${debdir}"
sudo apt install -y wget
# set up apt update hook
sudo tee "${aptconf}" << EOF
APT {
Update {
Pre-Invoke {
"wget -qNP '${debdir}' '${zoom_deburl}'";
"wget -qcP '${debdir}' '${zoom_deburl}'";
"cd '${debdir}'; apt-ftparchive packages . > '${debdir}/Packages'; apt-ftparchive release . > '${debdir}/Release'; cd - 1> /dev/null";
}
};
};
EOF
sudo tee "${sourceslist}" << EOF
deb [trusted=yes lang=none] "file:${debdir}" ./
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment