- Improve run.sh to allow direct call with appl full path in one argument.

This commit is contained in:
2025-11-06 16:28:11 +01:00
parent 1935ad1b30
commit b70332a608
4 changed files with 23 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ APPL_HOME_DIR="$(dirname "$(dirname "$0")")"
if [[ "$1" == "-h" ]]
then
echo "usage: run.sh [-h] [-i] <Application_Dir> <Application_Exec> [Args...]"
echo "usage: run.sh [-h] [-i] [<Application_Dir> <Application_Exec> | <Application_Exec>] [Args...]"
echo "with -i enabling internet access."
exit 0
@@ -24,11 +24,19 @@ else
export APPL_NETWORK="no-internet"
fi
export APPL_DIR="$1"
shift
if [[ -d "$1" ]]
then
export APPL_DIR="$1"
shift
export APPL_NAME="$1"
shift
else
export APPL_DIR="$( dirname $1)"
export APPL_NAME="./$(basename $1)"
shift
fi
export APPL_NAME="$1"
shift