Created
March 27, 2025 11:08
-
-
Save Hyperboid/c397779a08b757cdf2642998c12e6503 to your computer and use it in GitHub Desktop.
OneShot fixing machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This COMPLETELY UNTESTED script will HOPEFULLY remove the | |
# broken libraries from OneShot, making the game work on NixOS. | |
# It also removes a lot more libraries, but it's fine. | |
# If something fails, it's better to abort the whole script rather than blindly continue. | |
set -e | |
cd ~/.local/share/Steam/steamapps/common/OneShot | |
# Excessive list of files to remove. This can be trimmed down but I'm too lazy. | |
problem_files = ( | |
ld-linux-x86-64.so.2 | |
libatk-1.0.so.0 | |
libatk-bridge-2.0.so.0 | |
libatspi.so.0 | |
libblkid.so.1 | |
libbz2.so.1.0 | |
libcairo-gobject.so.2 | |
libcairo.so.2 | |
libcrypto.so.1.1 | |
libcrypt.so.1 | |
libdatrie.so.1 | |
libdbus-1.so.3 | |
libdbus-glib-1.so.2 | |
libdrm.so.2 | |
libEGL.so.1 | |
libepoxy.so.0 | |
libevdev.so.2 | |
libexpat.so.1 | |
libffi.so.6 | |
libFLAC.so.8 | |
libfontconfig.so.1 | |
libfreetype.so.6 | |
libfribidi.so.0 | |
libgcc_s.so.1 | |
libgcrypt.so.20 | |
libgdk-3.so.0 | |
libgdk_pixbuf-2.0.so.0 | |
libgdk-x11-2.0.so.0 | |
libgio-2.0.so.0 | |
libGLdispatch.so.0 | |
libglib-2.0.so.0 | |
libgmodule-2.0.so.0 | |
libgmp.so.10 | |
libgobject-2.0.so.0 | |
libgpg-error.so.0 | |
libgraphite2.so.3 | |
libgthread-2.0.so.0 | |
libgtk-3.so.0 | |
libgtk-x11-2.0.so.0 | |
libgudev-1.0.so.0 | |
libharfbuzz.so.0 | |
libICE.so.6 | |
libjpeg.so.8 | |
libKF5WindowSystem.so.5 | |
liblz4.so.1 | |
liblzma.so.5 | |
libmount.so.1 | |
libmtdev.so.1 | |
libncursesw.so.6 | |
libogg.so.0 | |
libopenal.so.1 | |
libpcre.so.1 | |
libpixman-1.so.0 | |
libpng16.so.16 | |
libreadline.so.8 | |
libresolv.so.2 | |
librt.so.1 | |
libSM.so.6 | |
libspeex.so.1 | |
libssl.so.1.1 | |
libstdc++.so.6 | |
libsystemd.so.0 | |
libthai.so.0 | |
libtiff.so.5 | |
libts.so.0 | |
libudev.so.1 | |
libuuid.so.1 | |
libvorbisfile.so.3 | |
libvorbis.so.0 | |
libwacom.so.2 | |
libwayland-client.so.0 | |
libwayland-cursor.so.0 | |
libwayland-egl.so.1 | |
libzstd.so.1 | |
) | |
# Empty out existing LibBackup if it exists | |
if [ -d LibBackup ] then | |
pushd LibBackup | |
for file in *; do | |
mv $file .. | |
done | |
popd | |
fi | |
# Make LibBackup if it doesn't exist | |
mkdir -p LibBackup | |
# Move problematic files into backup folder | |
for file in "${problem_files[@]}"; do | |
mv "$file" LibBackup | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment