#!/bin/bash

cd ../
WIM=`pwd`
echo $WIM

if [[ ! -d "${WIM}/BIN/LIBRETRO" ]]; then mkdir -p ${WIM}/BIN/LIBRETRO/;fi

cd ${WIM}/BIN


for var in `cat ../ROM_CONFIG_FILES.csv| cut -d',' -f2| sort -u| grep -v SYS$`
	do
		./download_graphical.py LIBRETRO  $var
	done
./download_graphical.py LIBRETRO retroarch
./download_graphical.py LIBRETRO config_libretro

mv ${WIM}/BIN/LIBRETRO/config_libretro.cfg ${WIM}/BIN/LIBRETRO/retroarch.cfg
chmod +x ${WIM}/BIN/LIBRETRO/retroarch



