blob: 879904c5aea5f40458d3dcee03f28d6dd07c242b (
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
|
#!/bin/sh
source /etc/preinit
script_init
echo "current firmware: $(currentFirmware)"
printSoftwareInfo
firmware="$1"
if [ "$firmware" != "auto" ] && [ "$firmware" != "_nand_" ]; then
firmware="$(echo "$firmware" | sed -re 's/^\/usr\/share\/games\/(nes\/kachikachi\/)?/\/var\/games\//')"
firmware="$(readlink -f "$firmware")"
checkFirmware "$firmware" || exit 1
fi
[ "$cfg_firmware" == "$firmware" ] && exit 0
cfg_firmware="$firmware"
save_config
[ "$(currentFirmware)" == "$firmware" ] && exit 0
[ "$(currentFirmware)" == "auto" ] && exit 0 #?
state_path="/var/saves/$modname"
state_file="$state_path/menu"
rm -f $state_file
echo "changing firmware to: $firmware"
reboot
exit 0
|