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/snes9x.hmod/bin/snes')
-rwxr-xr-xcore_modules/snes9x.hmod/bin/snes26
1 files changed, 26 insertions, 0 deletions
diff --git a/core_modules/snes9x.hmod/bin/snes b/core_modules/snes9x.hmod/bin/snes
new file mode 100755
index 0000000..4eaef77
--- /dev/null
+++ b/core_modules/snes9x.hmod/bin/snes
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+filename=$1
+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)
+fi
+
+filebase=$(basename "$filename")
+extension="${filebase##*.}"
+if [ "$extension" == "sfrom" ]; then
+ mkdir -p $tmppath
+ rm -f $tmppath/*.7z
+ rm -f $tmppath/*.bin
+ dd if="$filename" of="$tmppath/$filebase.bin" bs=48 skip=1
+ filename=$tmppath/$filebase.bin
+fi
+shift
+
+exec retroarch-clover snes9x "$filename" "$@"