Created
June 13, 2015 17:32
-
-
Save emorrp1/eea576daf0be74877b31 to your computer and use it in GitHub Desktop.
netselect-apt combined with apt-spy
This file contains hidden or 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/sh | |
sudo netselect-apt -o /dev/null > netselect-apt.out | |
sudo netselect-apt -o /dev/null >> netselect-apt.out | |
sudo netselect-apt -o /dev/null >> netselect-apt.out | |
awk -F'/' '{print $3}' netselect-apt.out | sed '/^$/d' > netselect-apt | |
apt-spy update -m apt-spy.mirrors | |
grep -f netselect-apt apt-spy.mirrors | grep -v '^ ' > apt-spy.domains | |
echo -e "AA\n" > apt-spy | |
cat apt-spy.domains >> apt-spy | |
echo >> apt-spy | |
apt-spy -d jessie -m apt-spy -s AA -o sources.list | |
rm netselect-apt* apt-spy* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment