Skip to content

Commit

Permalink
Merge pull request #1058 from t0b10-r3tr0/ready_to_runs_bind_dir_patch
Browse files Browse the repository at this point in the history
Ready to runs: Replace symbolic links with bind mounts.
  • Loading branch information
Cebion authored Dec 23, 2024
2 parents f13d9b8 + 45420ba commit 09a4c79
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 64 deletions.
7 changes: 3 additions & 4 deletions ports/armagetronad/Armagetron Advanced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

Expand All @@ -31,8 +31,7 @@ export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export TEXTINPUTINTERACTIVE="Y"
#export XDG_DATA_HOME="$CONFDIR"

$ESUDO rm -rf ~/.armagetronad
ln -sfv /$directory/ports/armagetronad/conf/.armagetronad ~/
bind_directories ~/.armagetronad /$directory/ports/armagetronad/conf/.armagetronad

cd $GAMEDIR

Expand Down Expand Up @@ -61,4 +60,4 @@ $GPTOKEYB "armagetronad.${DEVICE_ARCH}" -c "./armagetronad.gptk" &

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
5 changes: 2 additions & 3 deletions ports/asylum/Asylum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

Expand All @@ -35,8 +34,8 @@ export XDG_DATA_HOME="$CONFDIR"

$ESUDO chmod 666 /dev/uinput

$ESUDO rm -rf ~/.asylum
ln -sfv /$directory/ports/asylum/conf/.asylum ~/
# delete the remenents of the old file structure
bind_directories: ~/.asylum "$GAMEDIR/conf/.asylum"

cd $GAMEDIR

Expand Down
6 changes: 3 additions & 3 deletions ports/block.attack/Block Attack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR="/$directory/ports/blockattack"
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1
cd $GAMEDIR

$ESUDO rm -rf ~/.local/share/blockattack
ln -sfv $GAMEDIR/ ~/.local/share
bind_directories ~/.local/share/blockattack $GAMEDIR/

DEVICE_ARCH="${DEVICE_ARCH:-aarch64}"

Expand All @@ -37,3 +36,4 @@ $GPTOKEYB "blockattack.${DEVICE_ARCH}" -c "$GAMEDIR/blockattack.gptk" &
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty1

7 changes: 2 additions & 5 deletions ports/boswars/Bos Wars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -30,8 +28,7 @@ export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export XDG_DATA_HOME="$CONFDIR"

$ESUDO rm -rf ~/.boswars
ln -sfv $GAMEDIR/conf/.boswars ~/
bind_directories ~/.boswars $GAMEDIR/conf/.boswars

sed -i "s/\(VideoWidth = \)[0-9]\+\(,\)/\1$DISPLAY_WIDTH\2/" $GAMEDIR/conf/.boswars/preferences.lua
sed -i "s/\(VideoHeight = \)[0-9]\+\(,\)/\1$DISPLAY_HEIGHT\2/" $GAMEDIR/conf/.boswars/preferences.lua
Expand All @@ -43,4 +40,4 @@ $GPTOKEYB "$BINARY" -c ./boswars.${ANALOG_STICKS}.gptk textinput &

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
5 changes: 3 additions & 2 deletions ports/c-dogs/C-Dogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ else
fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

Expand Down Expand Up @@ -42,8 +43,7 @@ fi



rm -rf ~/.config/cdogs-sdl
ln -sfv $GAMEDIR/conf/cdogs-sdl/ ~/.config/
bind_directories ~/.config/cdogs-sdl $GAMEDIR/conf/cdogs-sdl/

cd $GAMEDIR/data

Expand All @@ -54,3 +54,4 @@ $ESUDO kill -9 $(pidof oga_controls)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty1


11 changes: 4 additions & 7 deletions ports/ceferino/Don Ceferino Hazaña.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,17 @@ BINARY=ceferino

> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

mkdir -p "$GAMEDIR/conf"
cd $GAMEDIR

bind_files ~/.ceferino $GAMEDIR/conf/.ceferino

export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export XDG_DATA_HOME="$CONFDIR"
export TEXTINPUTINTERACTIVE="Y"

$ESUDO rm -rf ~/.ceferino
ln -sfv $GAMEDIR/conf/.ceferino ~/

cd $GAMEDIR

$GPTOKEYB "$BINARY" -c ./$BINARY.gptk &
pm_platform_helper "$GAMEDIR/$BINARY"
./$BINARY

pm_finish
pm_finish
Empty file.
7 changes: 2 additions & 5 deletions ports/freesiege/FreeSiege.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -33,8 +31,7 @@ export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
#export TEXTINPUTINTERACTIVE="Y"

$ESUDO rm -rf ~/.freesiege
ln -sfv /$directory/ports/freesiege/conf/.freesiege ~/
bind_directories ~/.freesiege /$directory/ports/freesiege/conf/.freesiege

cd $GAMEDIR

Expand All @@ -43,4 +40,4 @@ $GPTOKEYB "freesiege" -c "./freesiege.gptk" &

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
5 changes: 3 additions & 2 deletions ports/gigalomania/Gigalomania.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ else
fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

Expand All @@ -21,8 +22,7 @@ GAMEDIR=/$directory/ports/gigalomania

cd $GAMEDIR

$ESUDO rm -rf ~/.config/gigalomania/
ln -sfv /$directory/ports/gigalomania/conf/ ~/.config/gigalomania
bind_directories ~/.config/gigalomania/ /$directory/ports/gigalomania/conf/

export LD_LIBRARY_PATH="$PWD/libs:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
Expand All @@ -35,3 +35,4 @@ $GPTOKEYB "gigalomania" -c "./gigalomania.gptk" &
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0

7 changes: 2 additions & 5 deletions ports/grafx2/Grafx2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -27,8 +25,7 @@ mkdir -p "$GAMEDIR/conf"

$ESUDO chmod 666 /dev/uinput

$ESUDO rm -rf ~/.config/grafx2
ln -sfv $GAMEDIR/conf/.config/grafx2 ~/.config/
bind_directories ~/.config/grafx2 $GAMEDIR/conf/.config/grafx2

export XDG_DATA_HOME="$CONFDIR"
export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
Expand All @@ -42,4 +39,4 @@ bin/grafx2-sdl2 -double

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
7 changes: 2 additions & 5 deletions ports/heroes/Heroes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -30,8 +28,7 @@ export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export XDG_DATA_HOME="$CONFDIR"

$ESUDO rm -rf ~/.heroes
ln -sfv $GAMEDIR/conf/.heroes ~/
bind_directories ~/.heroes $GAMEDIR/conf/.heroes

cd $GAMEDIR

Expand All @@ -40,4 +37,4 @@ $GPTOKEYB "$BINARY" -c ./$BINARY.gptk textinput &

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
5 changes: 3 additions & 2 deletions ports/hex-a-hop/Hex-A-Hop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ else
fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR=/$directory/ports/hex-a-hop
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1
cd $GAMEDIR

$ESUDO rm -rf ~/.hex-a-hop
ln -sfv /$directory/ports/hex-a-hop/conf/.hex-a-hop ~/
bind_directories ~/.hex-a-hop /$directory/ports/hex-a-hop/conf/.hex-a-hop

export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH"
Expand All @@ -34,3 +34,4 @@ $GPTOKEYB "hex-a-hop" -c "./hex-a-hop.gptk" &
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0

7 changes: 2 additions & 5 deletions ports/holotzcastle/Holotz Castle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls
Expand All @@ -31,8 +29,7 @@ export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export XDG_DATA_HOME="$CONFDIR"

$ESUDO rm -rf ~/.holotz-castle
ln -sfv $GAMEDIR/conf/.holotz-castle ~/
bind_directories ~/.holotz-castle $GAMEDIR/conf/.holotz-castle

cd $GAMEDIR

Expand All @@ -43,4 +40,4 @@ $GPTOKEYB "$BINARY" -c ./$BINARY.gptk &

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
printf "\033c" > /dev/tty0
6 changes: 3 additions & 3 deletions ports/lierolibre/LieroLibre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR=/$directory/ports/lierolibre

# Set up savedata
$ESUDO rm -rf ~/.lierolibre
ln -sfv "$GAMEDIR/savedata/.lierolibre" ~/
bind_directories ~/.lierolibre "$GAMEDIR/savedata/.lierolibre"

# Enable logging
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1
Expand All @@ -41,3 +40,4 @@ $GPTOKEYB "lierolibre" -c "./lierolibre.gptk" &
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0

6 changes: 4 additions & 2 deletions ports/opentyrian/OpenTyrian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ else
fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

Expand All @@ -31,8 +32,8 @@ elif [[ $whichos == *"RetroOZ"* ]]; then
cp /home/odroid/.asoundrcfords /home/odroid/.asoundrc
fi

$ESUDO rm -rf ~/.config/opentyrian
ln -sfv $GAMEDIR/ ~/.config/
bind_directories ~/.config/opentyrian $GAMEDIR/

cd $GAMEDIR
$GPTOKEYB opentyrian &
$GAMEDIR/opentyrian --data=$GAMEDIR/data 2>&1 | tee $GAMEDIR/log.txt
Expand All @@ -47,3 +48,4 @@ $ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" >> /dev/tty1


5 changes: 3 additions & 2 deletions ports/rocksndiamonds/Rocks n Diamonds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ else
fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR="/$directory/ports/rocksndiamonds"

$ESUDO chmod 666 /dev/tty1

$ESUDO rm -rf ~/.rocksndiamonds
ln -sfv $GAMEDIR/conf/.rocksndiamonds/ ~/
bind_directories ~/.rocksndiamonds $GAMEDIR/conf/.rocksndiamonds/
cd $GAMEDIR
$ESUDO $controlfolder/oga_controls rocksndiamonds $param_device &
./rocksndiamonds 2>&1 | tee $GAMEDIR/log.txt
$ESUDO kill -9 $(pidof oga_controls)
$ESUDO systemctl restart oga_events &
printf "\033c" >> /dev/tty1


5 changes: 3 additions & 2 deletions ports/shippy/Shippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ else
fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR=/$directory/ports/shippy

exec > >(tee "$GAMEDIR/log.txt") 2>&1

$ESUDO rm -rf /storage/.local/share/shippy
ln -sfv /$directory/ports/shippy /storage/.local/share/shippy
bind_directories /storage/.local/share/shippy /$directory/ports/shippy


cd $GAMEDIR
Expand All @@ -33,3 +33,4 @@ SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" ./shippy
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0

Loading

0 comments on commit 09a4c79

Please sign in to comment.