mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 09:00:17 +02:00
- Makes all scripts POSIX-compliant - General formatting and such - shellcheck :) Shell script is love. Shell script is life. Signed-off-by: crueter <crueter@eden-emu.dev>
34 lines
767 B
Bash
Executable File
34 lines
767 B
Bash
Executable File
#!/bin/sh
|
|
FEX=${1:-FEXLoader}
|
|
echo "Using $FEX"
|
|
|
|
for fileid in ~/.fex-emu/aotir/*.path; do
|
|
filename=$(cat "$fileid")
|
|
args=""
|
|
|
|
# if L is 6 chars from the end, use localflags
|
|
case $fileid in
|
|
*L?????) _abi=--abilocalflags ;;
|
|
*) _abi=--no-abilocalflags ;;
|
|
esac
|
|
|
|
# if T is 7 chars from the end, use tso
|
|
case $fileid in
|
|
*T??????) _tso=--tsoenabled ;;
|
|
*) _tso=--no-tsoenabled ;;
|
|
esac
|
|
|
|
# if S is 8 chars from the end, use full smc
|
|
case $fileid in
|
|
*S???????) _smc=full ;;
|
|
*) _smc=mman ;;
|
|
esac
|
|
|
|
if [ -f "${fileid%.path}.aotir" ]; then
|
|
echo "$(basename "$fileid") has already been generated"
|
|
else
|
|
echo "Processing $(basename "$fileid") ($filename) with $args"
|
|
$FEX --aotirgenerate "$_abi" "$_tso" --smc="$_smc" "$filename"
|
|
fi
|
|
done
|