#!/bin/bash

readonly SYSTEMS="arcade atari2600 atarilynx fds gamegear gb gba gbc mastersystem megadrive msx msx2 neogeo nes ngp ngpc pcengine pcenginecd psx sega32x segacd snes wonderswan wonderswancolor"
readonly DIR=~/roms/cheevos_and_no_cheevos/

for SYSTEM in $SYSTEMS; do
    mkdir -p "${DIR}"/"${SYSTEM}"
    
    if test -d ~/roms/retroachievements.2020/"${SYSTEM}"; then
        ln -s ~/roms/retroachievements.2020/"${SYSTEM}" "${DIR}"/"${SYSTEM}"/cheevos
    fi
    
    if test -d ~/roms/rgbpi/"${SYSTEM}"; then
        ln -s ~/roms/rgbpi/"${SYSTEM}" "${DIR}"/"${SYSTEM}"/no_cheevos
    fi
done
