diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/run | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -9,6 +9,31 @@ # simple wrapper script to run non-installed executables from workdir +print_usage() +{ + echo "This utility can be used to run the executables in this folder:" + echo + echo " workdir/LinkTarget/Executable" + echo + echo "Usage:" + echo + echo " ./bin/run application [parameters]|--list|--help" + echo + echo "Use --list (same as -list or -l) to get the list of executables" + echo "Use --help (same as -help or -h) to get this help" +} + +list_executables() +{ + echo "Listing executables inside workdir/LinkTarget/Executable folder:" + find workdir/LinkTarget/Executable -executable -printf "%P\n" +} + +print_executable_name() +{ + echo "Setting env variables and running workdir/LinkTarget/Executable/$1" +} + setdefaults() { dir=$(realpath "$(pwd)") @@ -25,6 +50,14 @@ setdefaults() export URE_BOOTSTRAP=file://"${dir}"/instdir/program/fundamentalrc } +case "$1" in + ""|"-h"|"-help"|"--help") + print_usage; return 1;; + "-l"|"-list"|"--list") + list_executables; return 0;; + *) print_executable_name $1;; +esac + if uname | grep -i CYGWIN >/dev/null; then setdefaults |