-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBlobby Volley 2.sh
55 lines (40 loc) · 1.47 KB
/
Blobby Volley 2.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# PORTMASTER: blobby.volley2.zip, Blobby Volley 2.sh
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
export HOME=/root
if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
controlfolder="$XDG_DATA_HOME/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi
source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"
get_controls
SHDIR=$(dirname "$0")
GAMEDIR="$SHDIR/blobbyvolley2"
CONFDIR="$GAMEDIR/conf/"
mkdir -p "$GAMEDIR/conf"
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1
cd $GAMEDIR
export DEVICE_ARCH="${DEVICE_ARCH:-aarch64}"
if [ -f "${controlfolder}/libgl_${CFW_NAME}.txt" ]; then
source "${controlfolder}/libgl_${CFW_NAME}.txt"
else
source "${controlfolder}/libgl_default.txt"
fi
export XDG_DATA_HOME="$CONFDIR"
export XDG_CONFIG_HOME="$CONFDIR"
export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
$ESUDO chmod 666 /dev/uinput
$GPTOKEYB "blobby.${DEVICE_ARCH}" -c "$GAMEDIR/blobby.gptk.$ANALOG_STICKS" &
sleep 0.3 # For TSP only, do not move/modify this line.
./blobby.${DEVICE_ARCH}
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" >> /dev/tty1