#!/bin/sh
#
# Run Block Attack

# Function to find the real directory a program resides in.
FindPath()
{
fullpath="`echo $1 | grep /`"
if [ "$fullpath" = "" ]; then
oIFS="$IFS"
IFS=:
for path in $PATH
do if [ -x "$path/$1" ]; then
if [ "$path" = "" ]; then
path="."
fi
fullpath="$path/$1"
break
fi
done
IFS="$oIFS"
fi
if [ "$fullpath" = "" ]; then
fullpath="$1"
fi
# Is the awk/ls magic portable?
if [ -L "$fullpath" ]; then
fullpath=`ls -l "$fullpath" | awk '{ ORS=" "; i = 11; while ( i fi
dirname "$fullpath"
}

# Unfortunate hack until we figure out why TLS glibc breaks us
#if [ -d /lib/tls ]; then
#LD_ASSUME_KERNEL=2.4.19
#export LD_ASSUME_KERNEL
#fi

cd "`FindPath \"$0\"`"
#LD_LIBRARY_PATH="`pwd`/lib" exec 
./blockattack $*
