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

clover-kachikachi-wr « bin « rootfs « hakchi « mod_hakchi « mods - github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5160d7279b8e35a0e53ddc2ca7fd03cd90a125aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# Wrapper for kachikachi
# You can add extra command line arguments to all games at once
# using "cfg_nes_extra_args" variable in p0000_config
# or disable epilepsy protection using "cfg_disable_armet=y"

source /etc/preinit
script_init

filename="$(readlink -f "$1")"
filebase="$(basename "$filename")"
extension="${filebase##*.}"
tmppath="$temppath/rom"
if [ "$extension" == "7z" ]; then
  rm -rf "$tmppath"
  mkdir -p "$tmppath"
  cd "$tmppath"
  tiny7zx x "$filename"
  filename="$tmppath/$(ls)"
fi
if [ "$extension" == "gz" ]; then
  rm -rf "$tmppath"
  mkdir -p "$tmppath"
  gunzip -c > "$tmppath/$filebase"
  filename="$tmppath/$filebase"
fi
shift

args="$filename $@ $cfg_nes_extra_args"
[ "$cfg_disable_armet" == "y" ] && args="$(echo $args | sed 's/--enable-armet//g')"

exec /usr/bin/clover-kachikachi $args