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: fd24f406b4bf5057af9ac0ed02f2f82a9ef6d6d9 (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=$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=$(ls)
fi
if [ "$extension" == "gz" ]; then
  mkdir -p $tmppath
  rm -rf $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