Advertisement
britodfbr

pypimirror.sh

Aug 27th, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/bash
  2. for i in `lynx --source https://pypi.python.org/simple |grep href | cut -d'>' -f2 | cut -d'<' -f1`; do
  3.    echo https://pypi.python.org/simple/$i;
  4.    mkdir $i;
  5.    cd $i;
  6.    for a in `lynx --source "https://pypi.python.org/simple/$i" |grep href | sed 's/.*a href="\(.*\)" rel=.*/\1/'`; do
  7.         echo "Baixando https://pypi.python.org/simple/$i/$a ..."
  8.         wget -A "gz,zip" -c "https://pypi.python.org/simple/$i/$a"
  9.    done
  10.    cd ..
  11. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement