Skip to content

Instantly share code, notes, and snippets.

@johndrinkwater
Forked from flibitijibibo/GameName.sh
Created January 12, 2014 19:33
Show Gist options
  • Save johndrinkwater/8389308 to your computer and use it in GitHub Desktop.
Save johndrinkwater/8389308 to your computer and use it in GitHub Desktop.
#!/bin/bash
# GameName Shell Script
# Written by Ethan "flibitijibibo" Lee
# Move to script's directory
cd "`dirname "$0"`"
# Get the kernel/architecture information
UNAME=`uname`
ARCH=`uname -m`
# Set the libpath and pick the proper binary
if [ "$UNAME" == "Darwin" ]; then
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./osx/
./osx/gamename.osx
elif [ "$UNAME" == "Linux" ]; then
if [ "$ARCH" == "x86_64" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./x86_64/
./x86_64/gamename.x86_64 $@
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./x86/
./x86/gamename.x86 $@
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment