#! /bin/bash

# Creates various empty (stub) version of files

mkdir -p ./public/assets/generated/layers
mkdir -p ./public/assets/generated/themes
echo '{"layers": []}' > ./src/assets/generated/known_layers.json
rm -f ./public/assets/generated/layers/*.json
rm -f ./public/assets/generated/themes/*.json
echo '{}' > ./public/assets/generated/layers/favourite.json
echo '{}' > ./public/assets/generated/layers/summary.json
echo '{}' > ./public/assets/generated/layers/last_click.json
echo '{}' > ./public/assets/generated/layers/search.json
echo '[]' > ./public/assets/generated/theme_overview.json
echo '{}' > ./public/assets/generated/layers/geocoded_image.json
echo '{}' > ./public/assets/generated/layers/usersettings.json
TARGET_DATE="202001010000.00"  # Jan 1, 2020, 00:00:00

for file in ./public/assets/generated/layers/* ; do
  if [ -f "$file" ]; then
    touch -t "$TARGET_DATE" "$file"
  fi
done
