Datasets:
File size: 452 Bytes
adad30d |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/bin/bash
pv repos.csv | tail -n +2 | \
while IFS=, read -r repo stars fetched commit path; do
path=$(echo "$path" | tr -d '\r')
source=$(echo "$repo" | cut -d/ -f1)
if [ "$source" == "github.com" ]; then
repo_name=$(echo "$repo" | cut -d/ -f2-)
curl "https://raw.githubusercontent.com/$repo_name/$commit/$path" --silent --create-dirs -o "data/$repo/$path"
sleep 1
fi
done
|