#!/bin/bash
SCREEN=$2

if [[ "$1" == "001_REBOOT" ]]
	then
		sudo reboot
		exit
fi

if [[ "$1" == "001_HALT" ]]
	then
		sudo halt
		exit
fi

if [[ "$1" == "001_MEDIA" ]]
	then
		cd BIN
		./get_media_graphical.sh
		cd ../
		./start.py  $SCREEN

fi
if [[ "$1" == "001_BIOS" ]]
	then
		cd BIN
		./get_BIOS.sh
		cd ../
		./start.py  $SCREEN

fi
if [[ "$1" == "001_RETROARCH" ]]
	then
		cd BIN
		./get_libretro_rpi_2_3.sh
		cd ../
		./start.py  $SCREEN

fi



if [[ "$1" == "001_VERIF" ]]
	then
		cd BIN
		./verif_roms.sh
		cd ../
		./start.py  $SCREEN
fi
if [[ "$1" == "001_QUIT" ]]
	then
		echo "EXIT FE pyrharckade"
		exit
fi

if [[ "$1" == "001_EDIT" ]]
	then
		echo "EDIT ROM_CONFIG_FILES.csv pyrharckade"
		cd BIN
		./FILE_EDITOR.py
		cd ..
		./start.py  $SCREEN
		exit
fi


if [[ "$1" == "001_ALL_ROM" ]]
	then
		echo "GET ROM_CONFIG_FILES ALL ROMS pyrharckade"
		cd BIN
		./GetListAndGame.py
		cd ..
		./start.py  $SCREEN
		exit
fi




if [[ "$1" == "001_CONFIG_KEYBOARD" ]]
	then
		rm ./CONF/KeyMapKeyBoard.py*
		cd BIN
		
		./ConfigKeyboard.py
		cd ..
		./start.py  $SCREEN
		exit
fi


if [[ "$1" == "001_GET_LIST" ]]
        then
                cd BIN
                ./GetListAndGame.py
                cd ..
                ./start.py  $SCREEN
                exit
fi













