Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/retroarch-clover.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core_modules/snes9x2010.hmod/bin/snes9x2010')
-rwxr-xr-xcore_modules/snes9x2010.hmod/bin/snes9x201017
1 files changed, 8 insertions, 9 deletions
diff --git a/core_modules/snes9x2010.hmod/bin/snes9x2010 b/core_modules/snes9x2010.hmod/bin/snes9x2010
index 87b242b..d5d7944 100755
--- a/core_modules/snes9x2010.hmod/bin/snes9x2010
+++ b/core_modules/snes9x2010.hmod/bin/snes9x2010
@@ -5,14 +5,13 @@ filebase=$(basename "$filename")
extension="${filebase##*.}"
tmppath=/tmp/rom
if [ "$extension" == "7z" ]; then
- mkdir -p $tmppath
- rm -rf $tmppath/*
- cd $tmppath
- tiny7zx x $filename
- filename=$tmppath/$(ls)
- filename_str=${filename// /_}
- mv "$filename" "$filename_str"
- filename=$filename_str
+ rm -rf "$tmppath"
+ mkdir -p "$tmppath"
+ cd "$tmppath"
+ tiny7zx x "$filename"
+ filename="$(ls|head -n1)"
+ mv "$filename" "rom.${filename##*.}"
+ filename="$tmppath/rom.${filename##*.}"
fi
filebase=$(basename "$filename")
@@ -22,7 +21,7 @@ if [ "$extension" == "sfrom" ]; then
rm -f $tmppath/*.7z
rm -f $tmppath/*.bin
dd if="$filename" of="$tmppath/$filebase.bin" bs=48 skip=1
- filename=$tmppath/$filebase.bin
+ filename="$tmppath/$filebase.bin"
fi
shift