Commit 7b808a12 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Launch the executable from the current directory not in ./bin which allow...

Launch the executable from the current directory not in ./bin which allow application to use relative path for there files
parent 53682f14
......@@ -13,7 +13,7 @@
usage()
{
echo "usage: run.sh <project dir> [args ...]" >&2
echo "usage: run.sh <project dir> [args ...]"
}
[ $1 ] || { echo "Missing project directory."; usage; exit 1; }
......@@ -26,20 +26,20 @@ cd `dirname $0`
blaar_dir="$PWD"
blaar_build_dir="${blaar_dir}_build"
./compile.sh "$project_dir" "Release" "$project_name" >&2
[ $? -ne 0 ] && { echo "Fail compiling '$project_dir'" >&2; exit 2; }
./compile.sh "$project_dir" "Release" "$project_name"
[ $? -ne 0 ] && { echo "Fail compiling '$project_dir'"; exit 2; }
bin_dir="$blaar_build_dir/Release/bin"
bin_dir="$blaar_build_dir/Release"
shift #remove $0 i.e. run.sh
cd $bin_dir
echo >&2
echo "Execute $project_name" in $bin_dir>&2
echo "================" >&2
set -x
./$project_name "$@"
echo
echo "Execute $project_name"
echo "================"
echo
echo $bin_dir/$project_name "$@"
echo
$bin_dir/$project_name "$@"
exit $?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment