Commit 1e9a9e3e authored by Vladislav's avatar Vladislav

Update for portwine_exe (only .exe,.bat,.msi,.reg)

parent 8f160515
...@@ -939,7 +939,7 @@ search_desktop_file () { ...@@ -939,7 +939,7 @@ search_desktop_file () {
# Ремонт, если есть пустые строки и непонятные строки без .exe, .bat, .msi, .reg # Ремонт, если есть пустые строки и непонятные строки без .exe, .bat, .msi, .reg
if [[ $BROKEN_LINE == 1 ]] ; then if [[ $BROKEN_LINE == 1 ]] ; then
while IFS=" " read -r -a line4 ; do while IFS=" " read -r -a line4 ; do
if [[ -n ${line4[0]} ]] && [[ ${line4[0]} =~ (.[Bb][Aa][Tt]$|.[Ee][Xx][Ee]$|.[Mm][Ss][Ii]$|.[Rr][Ee][Gg]$) ]] if [[ -n ${line4[0]} ]] && [[ ${line4[0],,} =~ (.bat$|.exe$|.msi$|.reg$) ]]
then echo "${line4[*]}" then echo "${line4[*]}"
fi fi
done < "$PORT_WINE_TMP_PATH/statistics" > "$PORT_WINE_TMP_PATH/statistics_repair" done < "$PORT_WINE_TMP_PATH/statistics" > "$PORT_WINE_TMP_PATH/statistics_repair"
...@@ -1475,20 +1475,20 @@ init_wine_ver () { ...@@ -1475,20 +1475,20 @@ init_wine_ver () {
export WINELOADER="${WINEDIR}/bin/wine" export WINELOADER="${WINEDIR}/bin/wine"
export WINESERVER="${WINEDIR}/bin/wineserver" export WINESERVER="${WINEDIR}/bin/wineserver"
if [[ -d "${WINEDIR}/files" && ! -d "${WINEDIR}/dist" ]] ; then if [[ -d "${WINEDIR}/files" && ! -d "${WINEDIR}/dist" ]] ; then
for clear_dist_files in $(ls "${WINEDIR}" | sed -e "s/^files$//g" | sed -e "s/^version$//g") ; do for clear_dist_files in $(ls "${WINEDIR}" | sed -re "s/(^files$|^version$)//g") ; do
rm -fr "${WINEDIR}/$clear_dist_files" rm -fr "${WINEDIR}/$clear_dist_files"
done done
mv -f "${WINEDIR}/files"/* "${WINEDIR}/" mv -f "${WINEDIR}/files"/* "${WINEDIR}/"
rm -fr "${WINEDIR}/files" rm -fr "${WINEDIR}/files"
elif [[ ! -d "${WINEDIR}/files" && -d "${WINEDIR}/dist" ]] ; then elif [[ ! -d "${WINEDIR}/files" && -d "${WINEDIR}/dist" ]] ; then
for clear_dist_files in $(ls "${WINEDIR}" | sed -e "s/^dist$//g" | sed -e "s/^version$//g") ; do for clear_dist_files in $(ls "${WINEDIR}" | sed -re "s/(^dist$|^version$)//g") ; do
rm -fr "${WINEDIR}/$clear_dist_files" rm -fr "${WINEDIR}/$clear_dist_files"
done done
mv -f "${WINEDIR}/dist"/* "${WINEDIR}/" mv -f "${WINEDIR}/dist"/* "${WINEDIR}/"
rm -fr "${WINEDIR}/dist" rm -fr "${WINEDIR}/dist"
elif [[ -f "${WINEDIR}/proton_dist.tar" ]] ; then elif [[ -f "${WINEDIR}/proton_dist.tar" ]] ; then
unpack "${WINEDIR}/proton_dist.tar" "${WINEDIR}/" unpack "${WINEDIR}/proton_dist.tar" "${WINEDIR}/"
for clear_dist_files in $(ls "${WINEDIR}" | sed -e "s/^bin$//g" | sed -e "s/^lib$//g" | sed -e "s/^lib64$//g" | sed -e "s/^share$//g" | sed -e "s/^version$//g") ; do for clear_dist_files in $(ls "${WINEDIR}" | sed -re "s/(^bin$|^lib$|^lib64$|^share$|^version$)//g") ; do
rm -fr "${WINEDIR}/$clear_dist_files" rm -fr "${WINEDIR}/$clear_dist_files"
done done
fi fi
......
...@@ -52,25 +52,21 @@ if [[ "${1,,}" =~ .ppack$ ]] ; then ...@@ -52,25 +52,21 @@ if [[ "${1,,}" =~ .ppack$ ]] ; then
export PW_NO_RESTART_PPDB="1" export PW_NO_RESTART_PPDB="1"
export PW_DISABLED_CREATE_DB="1" export PW_DISABLED_CREATE_DB="1"
portwine_exe="$1" portwine_exe="$1"
elif [[ -f "$1" ]] ; then elif [[ "${1,,}" =~ (.exe$|.bat$|.msi$|.reg$) ]] ; then
portwine_exe="$(realpath -s "$1")" if [[ -f "$1" ]] ; then
elif [[ -f "$OLDPWD/$1" ]] \ portwine_exe="$(realpath -s "$1")"
&& [[ "${1,,}" =~ (.exe$|.bat$|.msi$|.reg$) ]] elif [[ -f "$OLDPWD/$1" ]] ; then
then portwine_exe="$(realpath -s "$OLDPWD/$1")"
portwine_exe="$(realpath -s "$OLDPWD/$1")" elif [[ ! -f "$1" ]] ; then
elif [[ "$1" =~ (^--debug$|^--launch$|^--edit-db$) ]] \ portwine_exe="$1"
&& [[ -f "$2" ]] MISSING_DESKTOP_FILE="1"
then fi
portwine_exe="$(realpath -s "$2")" elif [[ "$1" =~ (^--debug$|^--launch$|^--edit-db$) && "${2,,}" =~ (.exe$|.bat$|.msi$|.reg$) ]] ; then
elif [[ "$1" =~ (^--debug$|^--launch$|^--edit-db$) ]] \ if [[ -f "$2" ]] ; then
&& [[ -f "$OLDPWD/$2" ]] \ portwine_exe="$(realpath -s "$2")"
&& [[ "${2,,}" =~ (.exe$|.bat$|.msi$|.reg$) ]] elif [[ -f "$OLDPWD/$2" ]] ; then
then portwine_exe="$(realpath -s "$OLDPWD/$2")"
portwine_exe="$(realpath -s "$OLDPWD/$2")" fi
elif [[ "${1,,}" =~ (.exe$|.bat$|.msi$|.reg$) ]]
then
portwine_exe="$1"
MISSING_DESKTOP_FILE="1"
fi fi
export portwine_exe export portwine_exe
......
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