#!/bin/bash -exu

cd "`dirname $0`/.."

if [[ "${NODE_ENV:-development}" == "development" ]]
then
  if [[ -e .icons-made ]]
  then
    echo "Icons are already made; if this is incorrect, remove the './.icons-made' file."
    exit 0
  fi
fi

"$(npm bin)/cordova-splash" &
splashPid=$!
"$(npm bin)/cordova-icon"
wait $splashPid

touch .icons-made
