Last active
April 6, 2021 20:29
-
-
Save liorkesos/670b3ee7dda89debd38c79abc9436825 to your computer and use it in GitHub Desktop.
Download apt and
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
#!/bin/bash | |
PACKAGES="ntp realmd libnss-sss libpam-sss sssd sssd-tools adcli samba-common-bin oddjob oddjob-mkhomedir packagekit" | |
DATEDIR=`date +%d%m%Y` | |
mkdir $DATEDIR | |
cd $DATEDIR | |
for pkg in $PACKAGES; | |
do | |
apt-get download $pkg; | |
for i in $(apt-cache depends $pkg \ | |
| grep -E 'Depends|Recommends|Suggests' \ | |
| cut -d ':' -f 2,3 | sed -e s/'<'/''/ -e s/'>'/''/); | |
do | |
sudo apt-get download $i 2>>errors.txt; | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment