#!/bin/bash echo 'Downloading ISO 3166 mappings..' curl -sL -o iso-3166.json https://raw.githubusercontent.com/lukes/ISO-3166-Countries-with-Regional-Codes/master/all/all.json echo 'Downloading SVG icon flags...' curl -sL https://github.com/lipis/flag-icon-css/archive/0.8.4.tar.gz | tar xzf - echo 'Converting ISO 3166 codes from 2 character codes to 3 character codes..' node ./convert_codes.js echo 'Cleaning up...' rm iso-3166.json rm -rf flag-icon-css-0.8.4 echo 'SVG flags are in the "flags" directory and style sheet is "flag-icon.css"'