28 lines
591 B
Bash
Executable File
28 lines
591 B
Bash
Executable File
#!/bin/sh
|
|
# Author : Ismael Barros² <ismael@barros2.org>
|
|
# License : BSD http://en.wikipedia.org/wiki/BSD_license
|
|
|
|
APPDIR=$(dirname "$(readlink -f "$0")")
|
|
LOGFILE=$(mktemp --suffix=_AppRun )
|
|
|
|
BINARY=_BINARY_
|
|
BINARY_ARGS=
|
|
|
|
cd "${APPDIR}"
|
|
. ./util.sh
|
|
|
|
export LD_LIBRARY_PATH=$PWD/usr/lib/:${LD_LIBRARY_PATH}
|
|
export PATH=$PWD/usr/bin/:${PATH}
|
|
|
|
[ -z "$*" ] && show_usage "usage.txt"
|
|
|
|
setup_keepResolution
|
|
|
|
ret=0
|
|
{ ./$BINARY $BINARY_ARGS $@; ret=$?; } 2>&1 | tee "$LOGFILE"
|
|
|
|
[ $ret != 0 -a $ret != -1 ] && {
|
|
build_report "$LOGFILE" "$BINARY" > "${LOGFILE}.html"
|
|
xdg-open "${LOGFILE}.html" &
|
|
}
|