Skip to content

Instantly share code, notes, and snippets.

@nottux
Last active October 22, 2021 18:03
Show Gist options
  • Save nottux/0cec411c58c48f26f639570a13d964cc to your computer and use it in GitHub Desktop.
Save nottux/0cec411c58c48f26f639570a13d964cc to your computer and use it in GitHub Desktop.
#! /bin/sh
echo this script will delete the prefix if luancher, the game or patcher is not running
md5sum '/media/utku3/kioxia_32/Games/OriginsRO/prefix.tar'
tar -xf /media/utku3/kioxia_32/Games/OriginsRO/prefix.tar -C /dev/shm
cd '/dev/shm/ragnarok online origins/drive_c/OriginsRO'
GALLIUM_HUD="GPU-load+cpu+shader-clock+shader-clock" RADV_PERFTEST=aco WINEFSYNC=1 DXVK_HUD=full WINEPREFIX="/dev/shm/ragnarok online origins/" /home/utku3/.local/share/lutris/runners/wine/lutris-fshack-6.14-4-x86_64/bin/wine '/dev/shm/ragnarok online origins/drive_c/OriginsRO/OriginsroLauncher.exe'
sleep 10
while pgrep OriginsroLaunch > /dev/null || pgrep OriginsroPatch > /dev/null
do sleep 5
done
while pgrep oriro.exe > /dev/null
do sleep 10
done
echo assuming game is over
cd /dev/shm
tar -cf prefix.tar 'ragnarok online origins'
md5sum prefix.tar
sleep 10
rm -rf '/dev/shm/ragnarok online origins'
rsync /dev/shm/prefix.tar '/media/utku3/kioxia_32/Games/OriginsRO/prefix.tar'
rm /dev/shm/prefix.tar
@nottux
Copy link
Author

nottux commented Oct 22, 2021

rsync just copies the whole file to usb so it doesn't really work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment