Commit ad5f1c6b authored by Mikhail Tergoev's avatar Mikhail Tergoev

added args: --repair

parent 8532a121
...@@ -86,6 +86,8 @@ if ! check_flatpak ; then ...@@ -86,6 +86,8 @@ if ! check_flatpak ; then
echo "${XDG_DATA_HOME}/PortWINE/PortProton" > "${PP_CONFIG_FILE}" echo "${XDG_DATA_HOME}/PortWINE/PortProton" > "${PP_CONFIG_FILE}"
elif [[ -f "${HOME}/PortWINE/PortProton/data/scripts/start.sh" ]] ; then elif [[ -f "${HOME}/PortWINE/PortProton/data/scripts/start.sh" ]] ; then
echo "${HOME}/PortWINE/PortProton" > "${PP_CONFIG_FILE}" echo "${HOME}/PortWINE/PortProton" > "${PP_CONFIG_FILE}"
elif [[ -f "${HOME}/PortProton/data/scripts/start.sh" ]] ; then
echo "${HOME}/PortProton" > "${PP_CONFIG_FILE}"
fi fi
if [[ "$script_path" == "/usr/bin" ]] \ if [[ "$script_path" == "/usr/bin" ]] \
...@@ -93,9 +95,13 @@ if ! check_flatpak ; then ...@@ -93,9 +95,13 @@ if ! check_flatpak ; then
then then
export PORT_WINE_PATH="$(cat "${PP_CONFIG_FILE}" | head -n 1)" export PORT_WINE_PATH="$(cat "${PP_CONFIG_FILE}" | head -n 1)"
if [[ -f "${PORT_WINE_PATH}/data/scripts/start.sh" ]] ; then if [[ -f "${PORT_WINE_PATH}/data/scripts/start.sh" ]] ; then
if [[ "$1" == "--repair" ]] ; then
export PORT_WINE_DATA_PATH="${PORT_WINE_PATH}/data"
else
echo "${port_ver}" > "${PORT_WINE_PATH}/data/tmp/PortProton_ver" echo "${port_ver}" > "${PORT_WINE_PATH}/data/tmp/PortProton_ver"
/usr/bin/env bash "${PORT_WINE_PATH}/data/scripts/start.sh" "$@" /usr/bin/env bash "${PORT_WINE_PATH}/data/scripts/start.sh" "$@"
exit 0 exit 0
fi
else else
rm -f "${PP_CONFIG_FILE}" rm -f "${PP_CONFIG_FILE}"
fi fi
...@@ -104,18 +110,22 @@ else ...@@ -104,18 +110,22 @@ else
if [ "$script_path" == "/app/bin" ] ; then if [ "$script_path" == "/app/bin" ] ; then
export PORT_WINE_PATH="${XDG_DATA_HOME}" export PORT_WINE_PATH="${XDG_DATA_HOME}"
if [ -f "${PORT_WINE_PATH}/scripts/start.sh" ] ; then if [ -f "${PORT_WINE_PATH}/scripts/start.sh" ] ; then
if [[ "$1" == "--repair" ]] ; then
export PORT_WINE_DATA_PATH="${XDG_DATA_HOME}"
else
echo "${port_ver}" > "${PORT_WINE_PATH}/tmp/PortProton_ver" echo "${port_ver}" > "${PORT_WINE_PATH}/tmp/PortProton_ver"
/usr/bin/env bash "${PORT_WINE_PATH}/scripts/start.sh" "$@" /usr/bin/env bash "${PORT_WINE_PATH}/scripts/start.sh" "$@"
exit 0 exit 0
fi fi
fi fi
fi
fi fi
######################################################################## ########################################################################
export PW_SILENT_INSTALL=1
export PW_AUTOPLAY=1 export PW_AUTOPLAY=1
export INSTALLING_PORT=1 export INSTALLING_PORT=1
######################################################################## ########################################################################
if ! check_flatpak ; then if [[ "$1" != "--repair" ]] ; then
if ! check_flatpak ; then
inst1=$($yad_gui --title "$loc_install" --text "$loc_choose_path" --list --radiolist \ inst1=$($yad_gui --title "$loc_install" --text "$loc_choose_path" --list --radiolist \
--width=600 --height=200 --column="$loc_set" --column "$loc_path" \ --width=600 --height=200 --column="$loc_set" --column "$loc_path" \
TRUE "${def_path}" \ TRUE "${def_path}" \
...@@ -136,12 +146,15 @@ if ! check_flatpak ; then ...@@ -136,12 +146,15 @@ if ! check_flatpak ; then
if [[ ! -z "$PORT_WINE_PATH" ]] if [[ ! -z "$PORT_WINE_PATH" ]]
then echo "${PORT_WINE_PATH}" > "${PP_CONFIG_FILE}" then echo "${PORT_WINE_PATH}" > "${PP_CONFIG_FILE}"
fi fi
else else
export PORT_WINE_DATA_PATH="${XDG_DATA_HOME}" export PORT_WINE_DATA_PATH="${XDG_DATA_HOME}"
fi
fi fi
if [[ ! -d "${PORT_WINE_DATA_PATH}" ]] ; then if [[ ! -d "${PORT_WINE_DATA_PATH}" ]] ; then
mkdir -p "$PORT_WINE_DATA_PATH" || fatal "Cannot create a directory: $PORT_WINE_PATH" mkdir -p "$PORT_WINE_DATA_PATH" || fatal "Cannot create a directory: $PORT_WINE_PATH"
elif [[ "$1" == "--repair" ]] ; then
rm -f "${PORT_WINE_DATA_PATH}/scripts/"* 2>/dev/null
else else
rm -fr "${PORT_WINE_DATA_PATH}/tmp" rm -fr "${PORT_WINE_DATA_PATH}/tmp"
rm -f "${PORT_WINE_DATA_PATH}/scripts/"* 2>/dev/null rm -f "${PORT_WINE_DATA_PATH}/scripts/"* 2>/dev/null
......
...@@ -108,6 +108,13 @@ ...@@ -108,6 +108,13 @@
<content_rating type="oars-1.1"/> <content_rating type="oars-1.1"/>
<releases> <releases>
<release version="1.6.2" date="2024-07-13">
<description>
<ul>
<li>added args: --repair</li>
</ul>
</description>
</release>
<release version="1.6.1" date="2024-05-17"> <release version="1.6.1" date="2024-05-17">
<description> <description>
<ul> <ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment