Skip to content

Instantly share code, notes, and snippets.

@emorrp1
emorrp1 / gist:eea576daf0be74877b31
Created June 13, 2015 17:32
netselect-apt combined with apt-spy
#/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