Actually, it was a misunderstood.
The “–ips” does not work for searching the ips file in the folder, you have to specify the filename. So the correct is:
retroarch -L /path/core.so ~/room/your_room.zip --ips ~/translate/your_room.ips
Now it works.
Anyway, i created a linux script to search in another folder for an .ips (if find another file, it will try to unpack it, [zip, 7z for example,] and must have the same name inside the zip also).
It will work with files like this:
Goof Troop (USA).eng.zip
Goof Troop (USA).7z
Goof Troop (USA).ips
If more then one file is found, it will use the first one.
./exec_emulator.sh “emulator command” “rom path” “translation path”
Example of a command line:
./exec_emulator.sh “retroarch -L /usr/lib/libretro/snes9x_libretro.so” ~/“Games/Roms/Snes/Goof Troop (USA).zip” ~/“Games/Roms/Snes/Translation-ips/”
The code for exec_emulator.sh
#!/bin/bash
emulator_path=$1
rom_path=$2
param3=$3
# FILENAME, EXTENSION
file=$(basename "$rom_path")
filename="${file%.*}"
extension="${file##*.}"
# CHECK --ips PARAM
if [ $param3 ]; then
# FIND ips FILE > SEARCH SIMILAR NAME
#find "$param3" -maxdepth 1 -type f -name "$filename"'.*' | while read -r path
while read -r path
do
trans_file=$(basename "$path")
trans_extension="${trans_file##*.}"
if [ $trans_extension = "ips" ]; then #IPS FILE > TAKE PATH
#cp "$path" /tmp/ #IPS FILE > COPY
ips_file="--ips=$path"
else #COMPRESSED IPS FILE > EXTRACT TMP
#/usr/bin/7z x -y -o/tmp/ "$path"
ips_file="--ips=/tmp/$filename.ips" #POINT NEW IPS FILE ON TMP
fi
break # EXIT LOOP ON FIRST MATCH
done <<< "$(find "$param3" -maxdepth 1 -type f -name "$filename"'.*')"
fi
#EXECUTE EMULATOR
$emulator_path "$rom_path" "$ips_file"