diff --git a/tools/twn b/tools/twn index 031a5a3..f8d5f21 100755 --- a/tools/twn +++ b/tools/twn @@ -3,17 +3,16 @@ set +e +exe="$(basename $PWD)" toolpath="$(dirname -- "${BASH_SOURCE[0]}")" export TWNROOT=$(realpath "$toolpath"/../) export TWNBUILDDIR=$(realpath "$toolpath"/../.build) -exe="$(basename $PWD)" - case "$1" in build ) "$toolpath"/build.sh "${@:2}" ;; - run ) ./$exe "${@:2}" + run ) $0 build && ./$exe "${@:2}" ;; gdb ) unset DEBUGINFOD_URLS