Created
September 28, 2017 13:31
-
-
Save dlorenc/7317cd794fd81cec3675f3e86d9430d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgs="nginx apache2" | |
depfile=$(mktemp) | |
for pkg in $pkgs; do | |
apt-rdepends nginx --print-state | grep NotInstalled | cut -d' ' -f4 >> depfile | |
done | |
cat depfile | sort | uniq > depfile.txt | |
mkdir /tmp/debs | |
cd /tmp/debs | |
for i in $(cat depfile.txt); do apt-get download $i ; done | |
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment