- Add '-n' for non volatile Wine dir.
This commit is contained in:
43
bin/run.sh
43
bin/run.sh
@@ -8,21 +8,34 @@ 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"
|
||||
Pre_Cmd="export WINEPREFIX=/tmp/wine; mkdir /tmp/wine;"
|
||||
|
||||
|
||||
while [[ "$1" == "-h" || "$1" == "-i" || "$1" == "-n" ]]
|
||||
do
|
||||
if [[ "$1" == "-h" ]]
|
||||
then
|
||||
echo "usage: run.sh [-h] [-n] [-i] <Application_Dir> <Application_Exec> [Args...]"
|
||||
echo "with -i enabling internet access,"
|
||||
echo "with -n enabling non volatile wine directory."
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$1" == "-i" ]]
|
||||
then
|
||||
shift;
|
||||
export APPL_NETWORK="internet"
|
||||
fi
|
||||
|
||||
if [[ "$1" == "-n" ]]
|
||||
then
|
||||
shift;
|
||||
Pre_Cmd=""
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$1" == "-i" ]]
|
||||
then
|
||||
shift;
|
||||
export APPL_NETWORK="internet"
|
||||
else
|
||||
export APPL_NETWORK="no-internet"
|
||||
fi
|
||||
|
||||
export APPL_DIR="$1"
|
||||
shift
|
||||
@@ -43,6 +56,6 @@ cd "${APPL_HOME_DIR}"
|
||||
|
||||
sbin/docker_mk_env
|
||||
|
||||
docker compose run --rm wine /usr/local/sbin/user_add_exec ${USER_ID} ${USER} ${HOME} ${GROUP_ID} ${GROUP_NAME} "${APPL_DIR}" "${APPL_NAME}" "$@"
|
||||
docker compose run --rm wine /usr/local/sbin/user_add_exec ${USER_ID} ${USER} ${HOME} ${GROUP_ID} ${GROUP_NAME} "${APPL_DIR}" ${Pre_Cmd} "${APPL_NAME}" "$@"
|
||||
|
||||
docker compose down
|
||||
|
||||
Reference in New Issue
Block a user