#!/bin/bash
ITYPE=$1
if [ -n "$CUSTOM_CONFIGS_PATH" ]
then
    cp -uv ${CUSTOM_CONFIGS_PATH}/* ./configs
elif [ "$ITYPE" = "rtyserver" ] && ! [ -f ./configs/rtyserver.conf-common ]
then
  cp ./loop_data/loop_data/rtyserver.conf-common ./configs/rtyserver.conf-common
elif ! [ -f ./configs/$ITYPE.conf ]
then
  cp ./loop_data/loop_data/$ITYPE.conf ./configs/$ITYPE.conf
  cp ./loop_data/loop_data/searchmap.json ./configs/searchmap.json
fi
if ! [ -f ./configs/environment ]
then
  echo -n "" >./configs/environment
fi
