- Add '-d' option to disable sound.

This commit is contained in:
2025-04-14 19:50:09 +02:00
parent 300ef6e6a0
commit 39eb3c2d8a
4 changed files with 30 additions and 17 deletions

View File

@@ -8,21 +8,32 @@ APPL_HOME_DIR="$(dirname "$(dirname "$0")")"
#-------------------------------------------------------------------------------
if [[ "$1" == "-h" ]]
then
echo "usage: run.sh [-h] [-i] <Application_Dir> <Application_Exec> [Args...]"
echo "with -i enabling internet access."
exit 0
fi
export APPL_NETWORK="no-internet"
export PULSE_DISABLE_FLAG=""
if [[ "$1" == "-i" ]]
then
shift;
export APPL_NETWORK="internet"
else
export APPL_NETWORK="no-internet"
fi
while [[ "$1" == "-h" || "$1" == "-d" || "$1" == "-i" ]]
do
if [[ "$1" == "-h" ]]
then
echo "usage: run.sh [-h] [-d] [-i] <Application_Dir> <Application_Exec> [Args...]"
echo "with -d disabling sound,"
echo "with -i enabling internet access."
exit 0
fi
if [[ "$1" == "-d" ]]
then
shift;
export PULSE_DISABLE_FLAG="-disabled"
fi
if [[ "$1" == "-i" ]]
then
shift;
export APPL_NETWORK="internet"
fi
done
export APPL_DIR="$1"
shift