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

chmenu « bin « rootfs « hakchi « mod - github.com/ClusterM/hakchi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf4ebde16594afc47d3402d452f177ae819db0f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
source /etc/preinit
script_init

gameStorage="$installpath/games"
state_file="$gameStorage/menu.txt"

[ -z "$1" ] && exit 1
[ -f "$state_file" ] && prev_code="$(cat "$state_file")" || prev_code="000"
[ "$1" == "$prev_code" ] && exit 1

echo "Switching to menu $1"
targetpath="$gameStorage/$1"
containsGames "$targetpath" || exit 1
echo "$1" > "$state_file"

echo "New directory: $targetpath"
uistop
overmount_games "$1"
sleep 1
touch "/var/startmcp.flag"