#!/usr/bin/env bash

if [[ ! -r ./child_site_list.txt ]]; then
  echo;
  echo "        ./child_site_list.txt is missing or not readable.";
  echo;
  echo "        Make sure you're executing this script from a location from which";
  echo "        that relative path is available.";
  echo;
  exit 1;
fi

for site in `cat child_site_list.txt`; do
    echo "Site: [$site]";
    terminus site:upstream:clear-cache ${site};
    terminus upstream:updates:list ${site}.dev;
    terminus upstream:updates:apply ${site}.dev;
    echo;
    echo "=====================================";
    echo;
    echo;
done




