#!/bin/bash
BASE="https://raw.githubusercontent.com"
REPOSITORY="kangax/compat-table"
BRANCH="gh-pages"

FILES=("es5" "es6" "es7" "esintl")

for FILE in ${FILES[@]}; do
  echo "Feching $FILE data"
  mkdir -p "library/$FILE"
  curl -s "$BASE/$REPOSITORY/$BRANCH/data-$FILE.js" > "library/$FILE/index.js"
done
