#!/bin/bash

# This launcher script is inspired by Agop 'nullsquared' Shirinian's
# and Sven-Hendrik 'Svenstaro' Haase's launcher for portalized: 
# https://github.com/svenstaro/pseudoform/blob/master/bin/linux/release/portalized_launcher.sh
# Credits go to them :)

# Figure out user's machine architecture and launch correct executable
MACHINE=`uname -m`
if [ "$MACHINE" = "x86_64" ]; then
    LIBS=./lib64
    BIN=./main64
elif [ "$MACHINE" = "i686" ]; then
    LIBS=./lib32
    BIN=./main32
else
    echo "ERROR: Your machine type is unrecognized!"
fi

LD_LIBRARY_PATH="$LIBS":"$LD_LIBRARY_PATH" "$BIN"
