Created
May 31, 2014 14:14
-
-
Save matael/d3304357ca4dc8a713c9 to your computer and use it in GitHub Desktop.
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
01-Ain.shp.tar.gz | |
02-Aisne.shp.tar.gz | |
03-Allier.shp.tar.gz | |
04-Alpes-de-Haute-Provence.shp.tar.gz | |
05-Hautes-Alpes.shp.tar.gz | |
06-Alpes-Maritimes.shp.tar.gz | |
07-Ardèche.shp.tar.gz | |
08-Ardennes.shp.tar.gz | |
09-Ariège.shp.tar.gz | |
2A-Corse-du-Sud.shp.tar.gz | |
2B-Haute-Corse.shp.tar.gz | |
10-Aube.shp.tar.gz | |
11-Aude.shp.tar.gz | |
12-Aveyron.shp.tar.gz | |
13-Bouches-du-Rhône.shp.tar.gz | |
14-Calvados.shp.tar.gz | |
15-Cantal.shp.tar.gz | |
16-Charente.shp.tar.gz | |
17-Charente-Maritime.shp.tar.gz | |
18-Cher.shp.tar.gz | |
19-Corrèze.shp.tar.gz | |
21-Côte-d'Or.shp.tar.gz | |
22-Côtes-d'Armor.shp.tar.gz | |
22-Côtes-d-Armor.shp.tar.gz | |
23-Creuse.shp.tar.gz | |
24-Dordogne.shp.tar.gz | |
25-Doubs.shp.tar.gz | |
26-Drôme.shp.tar.gz | |
27-Eure.shp.tar.gz | |
28-Eure-et-Loir.shp.tar.gz | |
29-Finistère.shp.tar.gz | |
30-Gard.shp.tar.gz | |
31-Haute-Garonne.shp.tar.gz | |
32-Gers.shp.tar.gz | |
33-Gironde.shp.tar.gz | |
34-Hérault.shp.tar.gz | |
35-Ille-et-Vilaine.shp.tar.gz | |
36-Indre.shp.tar.gz | |
37-Indre-et-Loire.shp.tar.gz | |
38-Isère.shp.tar.gz | |
39-Jura.shp.tar.gz | |
40-Landes.shp.tar.gz | |
41-Loir-et-Cher.shp.tar.gz | |
42-Loire.shp.tar.gz | |
43-Haute-Loire.shp.tar.gz | |
44-Loire-Atlantique.shp.tar.gz | |
45-Loiret.shp.tar.gz | |
46-Lot.shp.tar.gz | |
47-Lot-et-Garonne.shp.tar.gz | |
48-Lozère.shp.tar.gz | |
49-Maine-et-Loire.shp.tar.gz | |
50-Manche.shp.tar.gz | |
51-Marne.shp.tar.gz | |
52-Haute-Marne.shp.tar.gz | |
53-Mayenne.shp.tar.gz | |
54-Meurthe-et-Moselle.shp.tar.gz | |
55-Meuse.shp.tar.gz | |
56-Morbihan.shp.tar.gz | |
51-Marne7-Moselle.shp.tar.gz | |
58-Nièvre.shp.tar.gz | |
59-Nord.shp.tar.gz | |
60-Oise.shp.tar.gz | |
61-Orne.shp.tar.gz | |
62-Pas-de-Calais.shp.tar.gz | |
63-Puy-de-Dôme.shp.tar.gz | |
64-Pyrénées-Atlantiques.shp.tar.gz | |
65-Hautes-Pyrénées.shp.tar.gz | |
66-Pyrénées-Orientales.shp.tar.gz | |
67-Bas-Rhin.shp.tar.gz | |
68-Haut-Rhin.shp.tar.gz | |
69-Rhône.shp.tar.gz | |
70-Haute-Saône.shp.tar.gz | |
71-Saône-et-Loire.shp.tar.gz | |
72-Sarthe.shp.tar.gz | |
73-Savoie.shp.tar.gz | |
74-Haute-Savoie.shp.tar.gz | |
75-Paris.shp.tar.gz | |
76-Seine-Maritime.shp.tar.gz | |
77-Seine-et-Marne.shp.tar.gz | |
78-Yvelines.shp.tar.gz | |
79-Deux-Sèvres.shp.tar.gz | |
80-Somme.shp.tar.gz | |
81-Tarn.shp.tar.gz | |
82-Tarn-et-Garonne.shp.tar.gz | |
83-Var.shp.tar.gz | |
84-Vaucluse.shp.tar.gz | |
85-Vendée.shp.tar.gz | |
86-Vienne.shp.tar.gz | |
86-Vienne87-Haute-Vienne.shp.tar.gz | |
88-Vosges.shp.tar.gz | |
89-Yonne.shp.tar.gz | |
90-Territoire-de-Belfort.shp.tar.gz | |
91-Essonne.shp.tar.gz | |
92-Hauts-de-Seine.shp.tar.gz | |
93-Seine-Saint-Denis.shp.tar.gz | |
94-Val-de-Marne.shp.tar.gz | |
95-Val-d'Oise.shp.tar.gz | |
95-Val-d-Oise.shp.tar.gz | |
972-Martinique.shp.tar.gz | |
973-Guyane.shp.tar.gz | |
974-La-Réunion.shp.tar.gz | |
974-La Réunion.shp.tar.gz | |
976-Mayotte.shp.tar.gz |
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/zsh | |
urlbase='http://export.openstreetmap.fr/contours-administratifs/communes/' | |
worker() { | |
while (true) { | |
read -u 0 | |
shp=$REPLY | |
print "$1: Downloading $shp" | |
wget -q $urlbase$shp -O $shp; | |
echo "$1: Unpacking $shp" | |
tar xzvf $shp | |
rm $shp | |
echo "$1: DONE $shp" | |
} | |
} | |
mkfifo pipe | |
worker "W0" < pipe & workers+=($!) | |
worker "W1" < pipe & workers+=($!) | |
worker "W2" < pipe & workers+=($!) | |
worker "W3" < pipe & workers+=($!) | |
for shp in $(cat shp_liste.txt); do | |
print $shp >> pipe | |
done; | |
wait ${worker[*]} | |
rm pipe | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment