#!/bin/sh
# This is a comment!


if [ $# -eq 0 ]
then
	echo "please put parameter [blue], [red] or [clear]"
elif   [ $1 == 'blue' ]
then
	echo "--------------------------Move to Blue Line--------------------------"
	cp ./STENCIL_KEYS/config.stencil-blue.json config.stencil.json
	cp ./STENCIL_KEYS/secrets.stencil-blue.json secrets.stencil.json
	#cp ./STENCIL_KEYS/.stencil-blue .stencil
	stencil pull
	#use other branch (cbl) to push
	echo "--------------------------Move to Blue Line Finished--------------------------"
elif [ $1 == 'red' ]
then
	echo "--------------------------Move to Heros Tool--------------------------"
	cp ./STENCIL_KEYS/config.stencil-red.json config.stencil.json
	cp ./STENCIL_KEYS/secrets.stencil-red.json secrets.stencil.json
	#cp ./STENCIL_KEYS/.stencil-red .stencil
	stencil pull
	#stencil start -v Red
	#stencil push -a Red -d
	echo "--------------------------Move to Heros Tool Finished--------------------------"
elif   [ $1 == 'blue-sandbox' ]
then
	echo "--------------------------Move to Blue Line Sandbox--------------------------"
	cp ./STENCIL_KEYS/config.stencil-blue-sandbox.json config.stencil.json
	cp ./STENCIL_KEYS/secrets.stencil-blue-sandbox.json secrets.stencil.json
	#cp ./STENCIL_KEYS/.stencil-blue-sandbox .stencil
	stencil pull
	#use other branch (cbl) to push 
	echo "--------------------------Move to Blue Line Sandbox Finished--------------------------"	
elif [ $1 == 'red-sandbox' ]
then
	echo "--------------------------Move to Heros Tool Sandbox--------------------------"
	cp ./STENCIL_KEYS/config.stencil-red-sandbox.json config.stencil.json
	cp ./STENCIL_KEYS/secrets.stencil-red-sandbox.json secrets.stencil.json
	#cp ./STENCIL_KEYS/.stencil-blue-sandbox .stencil
	stencil pull
	#stencil start -v Red
	#stencil push -a Red -d
	echo "--------------------------Move to Heros Tool Sandbox Finished--------------------------"	
elif [ $1 == 'clear' ]	
then
	echo "--------------------------Clear stencil--------------------------"
	rm config.stencil.json
	rm secrets.stencil.json
	#cp ./STENCIL_KEYS/.stencil-eu .stencil
	echo "--------------------------Clear stencil--------------------------"
else
	echo "please put parameter [blue], [red] or [clear]"
fi





