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

github.com/ClusterM/hakchi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Radtke <daniel.radtke@gmail.com>2017-11-21 22:04:11 +0300
committerDaniel Radtke <daniel.radtke@gmail.com>2017-11-21 22:06:34 +0300
commit1f0518fd4c364a28d8eb4cf1074b61d8901d482a (patch)
treee6653f3579b445517c6daaf1eff33c0b0d5aeed6
parent3a0239617ba12d8695c651998cd9caf6eb50391b (diff)
simplified overmount_games
-rw-r--r--mod/hakchi/rootfs/etc/preinit.d/b0010_functions18
1 files changed, 5 insertions, 13 deletions
diff --git a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions
index 481fde8..ea73c19 100644
--- a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions
+++ b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions
@@ -283,21 +283,13 @@ repair_games(){
overmount_games(){
local menu_code="000"
[ -f "$installpath/menu" ] && menu_code="$(cat "$installpath/menu")"
- [ -z "$menu_code" ] && menu_code="000"
+ containsGames "$rootfs$gamepath/$menu_code" || menu_code=""
echo "menu code: $menu_code"
- if [ "$menu_code" != "000" ]; then
- if containsGames "$rootfs$gamepath/$menu_code"; then
- repair_fonts "$rootfs$gamepath/$menu_code"
- overmount "$gamepath/$menu_code" "$gamepath" && repair_games "$rootfs$gamepath/$menu_code" && linkGames "$rootfs$gamepath/$menu_code" && return 0
- else
- echo "no romz found at: $rootfs$gamepath/$menu_code"
- fi
- fi
- if containsGames "$rootfs$gamepath"; then
- repair_fonts "$rootfs$gamepath"
- overmount "$gamepath" && repair_games "$rootfs$gamepath" && linkGames "$rootfs$gamepath" && return 0
+ if containsGames "$rootfs$gamepath/$menu_code"; then
+ overmount "$gamepath/$menu_code" "$gamepath" && repair_games "$rootfs$gamepath/$menu_code" && linkGames "$rootfs$gamepath/$menu_code" && return 0
+ else
+ echo "no romz found at: $rootfs$gamepath/$menu_code"
fi
- echo "no romz found at: $rootfs$gamepath"
linkGames "$gamepath"
return 1
}