Created
July 6, 2018 18:01
-
-
Save Istar-Eldritch/3d4847b26e006c8a5a349d95a6a7ac4f to your computer and use it in GitHub Desktop.
Patch Black Mesa
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
#! /bin/bash -e | |
# Requires bspatch ('bsdiff') and base64, mktemp ('coreutils'). | |
cd "$(dirname "$0")" | |
PATCHFILE="$(mktemp)" | |
cleanup() { | |
rm -f "$PATCHFILE" | |
} | |
trap cleanup EXIT | |
test -f bin/libtogl.so.orig && mv -f bin/libtogl.so.orig bin/libtogl.so | |
base64 -d <<'EOF' >"$PATCHFILE" | |
QlNESUZGNDA2AAAAAAAAAEgAAAAAAAAAQ0ELAAAAAABCWmg5MUFZJlNZwK5BaQAABsVCSCgoAAAB | |
QAAEACAAIjIZNCDJiDlgMp9Nni7kinChIYFcgtJCWmg5MUFZJlNZE3UXkgAFpsYFwAQQABAAABBA | |
IAAJIABQgyYgKUoyZOA3iopfZKkN6VRKdwolOY5kolO/i7kinChICbqLyQBCWmg5F3JFOFCQAAAA | |
AA== | |
EOF | |
bspatch bin/libtogl.so bin/libtogl.so.hax "$PATCHFILE" | |
mv bin/libtogl.so bin/libtogl.so.orig | |
mv bin/libtogl.so.hax bin/libtogl.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment