Commit abe678c9 authored by Vladislav's avatar Vladislav

dropped extra IFS and change <<< to < <

parent 76ebfaaa
...@@ -40,7 +40,7 @@ export -f print_wrapped ...@@ -40,7 +40,7 @@ export -f print_wrapped
make_acronym () { make_acronym () {
local words acronym i local words acronym i
IFS=' ' read -r -a words <<< "$1" read -r -a words <<< "$1"
acronym="${words[0]:0:1}" acronym="${words[0]:0:1}"
for ((i=1 ; i<${#words[@]} ; i++)) ; do for ((i=1 ; i<${#words[@]} ; i++)) ; do
acronym+="${words[$i]:0:1}" acronym+="${words[$i]:0:1}"
...@@ -265,7 +265,7 @@ EOF ...@@ -265,7 +265,7 @@ EOF
po_file="${PORT_WINE_PATH}/data/locales/$LANGUAGE/LC_MESSAGES/PortProton.po" po_file="${PORT_WINE_PATH}/data/locales/$LANGUAGE/LC_MESSAGES/PortProton.po"
fi fi
while IFS= read -r line ; do while read -r line ; do
while [[ $line =~ msgid ]] ; do while [[ $line =~ msgid ]] ; do
unset msgid unset msgid
msgid="$line" msgid="$line"
...@@ -606,9 +606,9 @@ try_download () { ...@@ -606,9 +606,9 @@ try_download () {
&& [[ "$no_mirror" != "true" ]] && [[ "$no_mirror" != "true" ]]
then then
FIRST_URL=("$url_cloud/$filename") FIRST_URL=("$url_cloud/$filename")
IFS=' ' read -r -a SECOND_URL <<< "$1" read -r -a SECOND_URL <<< "$1"
else else
IFS=' ' read -r -a FIRST_URL <<< "$1" read -r -a FIRST_URL <<< "$1"
SECOND_URL=("$url_cloud/$filename") SECOND_URL=("$url_cloud/$filename")
fi fi
...@@ -951,7 +951,7 @@ search_desktop_file () { ...@@ -951,7 +951,7 @@ search_desktop_file () {
desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}" desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}"
if [[ $desktop_file_new =~ .desktop$ ]] ; then if [[ $desktop_file_new =~ .desktop$ ]] ; then
if [[ ! $desktop_file_new =~ (PortProton|readme) ]] ; then if [[ ! $desktop_file_new =~ (PortProton|readme) ]] ; then
while IFS= read -r line1 ; do while read -r line1 ; do
if [[ $line1 =~ ^Exec= ]] ; then if [[ $line1 =~ ^Exec= ]] ; then
if check_flatpak ; then if check_flatpak ; then
EXEC_DESKTOP=${line1//Exec=flatpak run ru.linux_gaming.PortProton /} EXEC_DESKTOP=${line1//Exec=flatpak run ru.linux_gaming.PortProton /}
...@@ -968,7 +968,7 @@ search_desktop_file () { ...@@ -968,7 +968,7 @@ search_desktop_file () {
fi fi
done done
if [[ $DESKTOP_WITH_TIME == enabled ]] || [[ $SORT_WITH_TIME == enabled ]] ; then if [[ $DESKTOP_WITH_TIME == enabled ]] || [[ $SORT_WITH_TIME == enabled ]] ; then
while IFS=' ' read -r -a line2 ; do while read -r -a line2 ; do
if [[ -z ${line2[0]} ]] \ if [[ -z ${line2[0]} ]] \
|| [[ ! ${line2[0],,} =~ .(bat|exe|msi|reg)$ ]] ; then || [[ ! ${line2[0],,} =~ .(bat|exe|msi|reg)$ ]] ; then
BROKEN_LINE=1 BROKEN_LINE=1
...@@ -990,7 +990,7 @@ search_desktop_file () { ...@@ -990,7 +990,7 @@ search_desktop_file () {
## Ремонты: ## Ремонты:
# Ремонт, проверяет чтобы длинна хеш суммы была равна 64 символам, в ином случае удалит битые # Ремонт, проверяет чтобы длинна хеш суммы была равна 64 символам, в ином случае удалит битые
if [[ $FILE_SHA256SUM_NOT_FOUND == 1 ]] && [[ ${#line2[1]} != "64" ]] ; then if [[ $FILE_SHA256SUM_NOT_FOUND == 1 ]] && [[ ${#line2[1]} != "64" ]] ; then
while IFS=' ' read -r -a line3 ; do while read -r -a line3 ; do
if [[ ${#line3[1]} == "64" ]] if [[ ${#line3[1]} == "64" ]]
then echo "${line3[*]}" then echo "${line3[*]}"
fi fi
...@@ -1002,7 +1002,7 @@ search_desktop_file () { ...@@ -1002,7 +1002,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 read -r -a line4 ; do
if [[ -n ${line4[0]} ]] && [[ ${line4[0],,} =~ .(bat|exe|msi|reg)$ ]] if [[ -n ${line4[0]} ]] && [[ ${line4[0],,} =~ .(bat|exe|msi|reg)$ ]]
then echo "${line4[*]}" then echo "${line4[*]}"
fi fi
...@@ -1374,7 +1374,7 @@ get_and_set_reg_file () { ...@@ -1374,7 +1374,7 @@ get_and_set_reg_file () {
find_line=${find_line//:*/} find_line=${find_line//:*/}
fi fi
count=-1 count=-1
while IFS= read -r line_reg ; do while read -r line_reg ; do
((count++)) ((count++))
if [[ $line_reg =~ $name_for_find ]] ; then if [[ $line_reg =~ $name_for_find ]] ; then
if [[ $line_reg == $name_for_find$name_for_set ]] ; then if [[ $line_reg == $name_for_find$name_for_set ]] ; then
...@@ -1386,7 +1386,7 @@ get_and_set_reg_file () { ...@@ -1386,7 +1386,7 @@ get_and_set_reg_file () {
break break
fi fi
[[ -z $line_reg ]] && break [[ -z $line_reg ]] && break
done <<< "$(sed -n "$find_line"',$p' "$find_file")" done < <(sed -n "$find_line"',$p' "$find_file")
fi fi
if [[ $name_add_or_del == --add ]] ; then if [[ $name_add_or_del == --add ]] ; then
if [[ -z $find_block ]] ; then if [[ -z $find_block ]] ; then
...@@ -1448,7 +1448,7 @@ fixes_after_update () { ...@@ -1448,7 +1448,7 @@ fixes_after_update () {
fixes_path="$PORT_WINE_TMP_PATH/fixes_apply" fixes_path="$PORT_WINE_TMP_PATH/fixes_apply"
[[ ! -f $fixes_path ]] && touch "$fixes_path" [[ ! -f $fixes_path ]] && touch "$fixes_path"
while IFS= read -r line ; do while read -r line ; do
if [[ $line == "$fixes_info" ]] ; then if [[ $line == "$fixes_info" ]] ; then
return 1 return 1
fi fi
...@@ -2441,7 +2441,7 @@ pw_port_update () { ...@@ -2441,7 +2441,7 @@ pw_port_update () {
return 1 return 1
fi fi
IFS=' ' read -r -a PW_UPDATE_ALL_LIST <<< "$UPDATE_ETERFUND $UPDATE_GITHUB $UPDATE_PP_GITEA" read -r -a PW_UPDATE_ALL_LIST <<< "$UPDATE_ETERFUND $UPDATE_GITHUB $UPDATE_PP_GITEA"
UPDATE_MIN=${PW_UPDATE_ALL_LIST[0]} UPDATE_MIN=${PW_UPDATE_ALL_LIST[0]}
for i in "${!PW_UPDATE_ALL_LIST[@]}"; do for i in "${!PW_UPDATE_ALL_LIST[@]}"; do
...@@ -2887,8 +2887,8 @@ pw_find_exe () { ...@@ -2887,8 +2887,8 @@ pw_find_exe () {
--button="${translations[CANCEL]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":1 \ --button="${translations[CANCEL]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":1 \
--button="${translations[OK]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 2>/dev/null)" --button="${translations[OK]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 2>/dev/null)"
YAD_STATUS="$?" YAD_STATUS="$?"
IFS="$orig_IFS" IFS="$orig_IFS"
if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then if [[ "$YAD_STATUS" == "1" || "$YAD_STATUS" == "252" ]] ; then
print_info "Restarting..." print_info "Restarting..."
restart_pp restart_pp
...@@ -4542,7 +4542,7 @@ gui_proton_downloader () { ...@@ -4542,7 +4542,7 @@ gui_proton_downloader () {
pw_start_progress_bar_block "${translations[Check new version WINE...]}" pw_start_progress_bar_block "${translations[Check new version WINE...]}"
# PROTON_GE # PROTON_GE
read -r -d '' -a PROTON_GE_GIT <<< "$(curl -s "https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases" | grep "browser_download_url.*\.tar\.gz" | cut -d \" -f 4)" read -r -d '' -a PROTON_GE_GIT < <(curl -s "https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases" | grep "browser_download_url.*\.tar\.gz" | cut -d \" -f 4)
if [[ -n "${PROTON_GE_GIT[0]}" ]] ; then if [[ -n "${PROTON_GE_GIT[0]}" ]] ; then
for PGEGIT in "${PROTON_GE_GIT[@]}" ; do for PGEGIT in "${PROTON_GE_GIT[@]}" ; do
echo "${PGEGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.gz//' >> "${PW_TMPFS_PATH}/tmp_proton_ge_git" echo "${PGEGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.gz//' >> "${PW_TMPFS_PATH}/tmp_proton_ge_git"
...@@ -4551,7 +4551,7 @@ gui_proton_downloader () { ...@@ -4551,7 +4551,7 @@ gui_proton_downloader () {
fi fi
# WINE_KRON4EK # WINE_KRON4EK
read -r -d '' -a WINE_KRON4EK <<< "$(curl -s "https://api.github.com/repos/Kron4ek/Wine-Builds/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4)" read -r -d '' -a WINE_KRON4EK < <(curl -s "https://api.github.com/repos/Kron4ek/Wine-Builds/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4)
if [[ -n "${WINE_KRON4EK[0]}" ]] ; then if [[ -n "${WINE_KRON4EK[0]}" ]] ; then
for PGEGIT in "${WINE_KRON4EK[@]}" ; do for PGEGIT in "${WINE_KRON4EK[@]}" ; do
echo "${PGEGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PW_TMPFS_PATH}/tmp_wine_kron4ek_git" echo "${PGEGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PW_TMPFS_PATH}/tmp_wine_kron4ek_git"
...@@ -4560,7 +4560,7 @@ gui_proton_downloader () { ...@@ -4560,7 +4560,7 @@ gui_proton_downloader () {
fi fi
# WINE_GE_CUSTOM # WINE_GE_CUSTOM
read -r -d '' -a WINE_GE_CUSTOM <<< "$(curl -s "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4)" read -r -d '' -a WINE_GE_CUSTOM < <(curl -s "https://api.github.com/repos/GloriousEggroll/wine-ge-custom/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4)
if [[ -n "${WINE_GE_CUSTOM[0]}" ]] ; then if [[ -n "${WINE_GE_CUSTOM[0]}" ]] ; then
for PGEGIT in "${WINE_GE_CUSTOM[@]}" ; do for PGEGIT in "${WINE_GE_CUSTOM[@]}" ; do
echo "${PGEGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PW_TMPFS_PATH}/tmp_wine_ge_custom_git" echo "${PGEGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PW_TMPFS_PATH}/tmp_wine_ge_custom_git"
...@@ -4569,7 +4569,7 @@ gui_proton_downloader () { ...@@ -4569,7 +4569,7 @@ gui_proton_downloader () {
fi fi
# PROTON_LG # PROTON_LG
read -r -d '' -a PROTON_PW_GIT <<< "$(curl -s "https://api.github.com/repos/Castro-Fidel/wine_builds/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4 | sort -r)" read -r -d '' -a PROTON_PW_GIT < <(curl -s "https://api.github.com/repos/Castro-Fidel/wine_builds/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4 | sort -r)
if [[ -n "${PROTON_PW_GIT[0]}" ]] ; then if [[ -n "${PROTON_PW_GIT[0]}" ]] ; then
for PPWGIT in "${PROTON_PW_GIT[@]}" ; do for PPWGIT in "${PROTON_PW_GIT[@]}" ; do
echo "${PPWGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PW_TMPFS_PATH}/tmp_proton_pw_git" echo "${PPWGIT}" | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PW_TMPFS_PATH}/tmp_proton_pw_git"
...@@ -4934,7 +4934,7 @@ relaxed - Same as fifo but allows tearing when below the monitors refresh rate.] ...@@ -4934,7 +4934,7 @@ relaxed - Same as fifo but allows tearing when below the monitors refresh rate.]
;; ;;
esac esac
IFS=' ' read -r -a output_yad_edit_db <"${PW_TMPFS_PATH}/tmp_output_yad_edit_db" read -r -a output_yad_edit_db <"${PW_TMPFS_PATH}/tmp_output_yad_edit_db"
bool_from_yad="0" bool_from_yad="0"
for boole_to_int in "${PW_EDIT_DB_LIST[@]}" ; do for boole_to_int in "${PW_EDIT_DB_LIST[@]}" ; do
export "${boole_to_int}"="${output_yad_edit_db[$bool_from_yad]}" export "${boole_to_int}"="${output_yad_edit_db[$bool_from_yad]}"
...@@ -4988,8 +4988,8 @@ relaxed - Same as fifo but allows tearing when below the monitors refresh rate.] ...@@ -4988,8 +4988,8 @@ relaxed - Same as fifo but allows tearing when below the monitors refresh rate.]
gui_vkbasalt () { gui_vkbasalt () {
KEY_FX_GUI=$RANDOM KEY_FX_GUI=$RANDOM
FILE_VKBASALT_CONF="${PORT_WINE_PATH}/data/vkBasalt.conf" FILE_VKBASALT_CONF="${PORT_WINE_PATH}/data/vkBasalt.conf"
read -r -d '' -a LIST_FX <<< "$(grep -E '.fx$|.fxh$' "$FILE_VKBASALT_CONF" | awk '{print $1}')" read -r -d '' -a LIST_FX < <(grep -E '.fx$|.fxh$' "$FILE_VKBASALT_CONF" | awk '{print $1}')
IFS=' ' read -r -a GET_FX_IN_FILE <<< "$(echo "$PW_VKBASALT_EFFECTS" | sed -e s/"cas:"// -e s/":"/" "/g)" read -r -a GET_FX_IN_FILE < <(echo "$PW_VKBASALT_EFFECTS" | sed -e s/"cas:"// -e s/":"/" "/g)
PW_3DFX_INFO=${translations[Simulation of an old 3dfx graphics accelerator (adds horizontal stripes)]} PW_3DFX_INFO=${translations[Simulation of an old 3dfx graphics accelerator (adds horizontal stripes)]}
PW_AdaptiveSharpen_INFO=${translations[Sharpness increase, can be used with CAS]} PW_AdaptiveSharpen_INFO=${translations[Sharpness increase, can be used with CAS]}
...@@ -5493,7 +5493,7 @@ gui_dgvoodoo2 () { ...@@ -5493,7 +5493,7 @@ gui_dgvoodoo2 () {
;; ;;
esac esac
IFS=' ' read -r -a output_yad_dgv2 <"${PW_TMPFS_PATH}/tmp_yad_dgv2_set" read -r -a output_yad_dgv2 <"${PW_TMPFS_PATH}/tmp_yad_dgv2_set"
bool_from_yad=0 bool_from_yad=0
for boole_to_int in "${PW_DGV2_LIST[@]}" ; do for boole_to_int in "${PW_DGV2_LIST[@]}" ; do
export "${boole_to_int}"="${output_yad_dgv2[$bool_from_yad]}" export "${boole_to_int}"="${output_yad_dgv2[$bool_from_yad]}"
...@@ -5661,7 +5661,7 @@ gui_gamescope () { ...@@ -5661,7 +5661,7 @@ gui_gamescope () {
;; ;;
esac esac
IFS=' ' read -r -a output_yad_gs <"${PW_TMPFS_PATH}/tmp_yad_gs_set" read -r -a output_yad_gs <"${PW_TMPFS_PATH}/tmp_yad_gs_set"
bool_from_yad="0" bool_from_yad="0"
for boole_to_int in "${PW_GS_LIST[@]}" ; do for boole_to_int in "${PW_GS_LIST[@]}" ; do
export "${boole_to_int}"="${output_yad_gs[$bool_from_yad]}" export "${boole_to_int}"="${output_yad_gs[$bool_from_yad]}"
...@@ -5998,7 +5998,7 @@ portwine_output_yad_shortcut () { ...@@ -5998,7 +5998,7 @@ portwine_output_yad_shortcut () {
if [[ -f "${SLUF}" ]]; then if [[ -f "${SLUF}" ]]; then
SLUFUB=false SLUFUB=false
STUID64="" STUID64=""
while IFS= read -r line; do while read -r line; do
if [[ "${line}" =~ ^[[:space:]]*\"([0-9]+)\"$ ]]; then if [[ "${line}" =~ ^[[:space:]]*\"([0-9]+)\"$ ]]; then
STUIDCUR="${BASH_REMATCH[1]}" STUIDCUR="${BASH_REMATCH[1]}"
SLUFUB=true SLUFUB=true
...@@ -6083,7 +6083,7 @@ pw_auto_create_shortcut () { ...@@ -6083,7 +6083,7 @@ pw_auto_create_shortcut () {
done done
[[ -z "${LINKS[0]}" ]] && return 0 [[ -z "${LINKS[0]}" ]] && return 0
IFS=' ' read -r -a SORTED_LINKS <<< "$(echo "${LINKS[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')" read -r -a SORTED_LINKS < <(echo "${LINKS[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')
for link_file in "${SORTED_LINKS[@]//#@_@#/ }" ; do for link_file in "${SORTED_LINKS[@]//#@_@#/ }" ; do
if command -v exiftool &>/dev/null ; then if command -v exiftool &>/dev/null ; then
...@@ -6841,7 +6841,7 @@ See the License for details.]}" 2>/dev/null & ...@@ -6841,7 +6841,7 @@ See the License for details.]}" 2>/dev/null &
Developer assistants and testers:]} Developer assistants and testers:]}
$(credits_devel)" 2>/dev/null & $(credits_devel)" 2>/dev/null &
"${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=3 --text-info --scroll <<< "$(eval_translations "MIT License "${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=3 --text-info --scroll < <(eval_translations "MIT License
Copyright © \$%DATE% Castro-Fidel (linux-gaming.ru) Copyright © \$%DATE% Castro-Fidel (linux-gaming.ru)
...@@ -6861,7 +6861,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ...@@ -6861,7 +6861,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE." "DATE=$(date +%Y)")" 2>/dev/null & SOFTWARE." "DATE=$(date +%Y)") 2>/dev/null &
"${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=4 \ "${pw_yad}" --plug="${KEY_CREDITS}" --tabnum=4 \
--text-info --show-uri --scroll \ --text-info --show-uri --scroll \
......
...@@ -40,7 +40,7 @@ source "$PORT_SCRIPTS_PATH/functions_helper" ...@@ -40,7 +40,7 @@ source "$PORT_SCRIPTS_PATH/functions_helper"
export PW_START_PID="$$" export PW_START_PID="$$"
export NO_AT_BRIDGE="1" export NO_AT_BRIDGE="1"
export GDK_BACKEND="x11" export GDK_BACKEND="x11"
IFS=' ' read -r -a pw_full_command_line <<< "$0 $*" read -r -a pw_full_command_line <<< "$0 $*"
export pw_full_command_line export pw_full_command_line
export orig_IFS="$IFS" export orig_IFS="$IFS"
...@@ -358,7 +358,7 @@ EOF ...@@ -358,7 +358,7 @@ EOF
else else
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" ]] ; then if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" ]] ; then
while IFS= read -r line while read -r line
do do
export portwine_exe="$PORT_WINE_PATH/data/prefixes/$PW_PREFIX_NAME/$line" export portwine_exe="$PORT_WINE_PATH/data/prefixes/$PW_PREFIX_NAME/$line"
portwine_create_shortcut portwine_create_shortcut
...@@ -614,7 +614,7 @@ else ...@@ -614,7 +614,7 @@ else
desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}" desktop_file_new="${desktop_file//"$PORT_WINE_PATH/"/}"
if [[ $desktop_file_new =~ .desktop$ ]] ; then if [[ $desktop_file_new =~ .desktop$ ]] ; then
if [[ ! $desktop_file_new =~ (PortProton|readme) ]] ; then if [[ ! $desktop_file_new =~ (PortProton|readme) ]] ; then
while IFS= read -r line1 ; do while read -r line1 ; do
if [[ $line1 =~ ^Exec= ]] ; then if [[ $line1 =~ ^Exec= ]] ; then
if check_flatpak ; then if check_flatpak ; then
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${line1//Exec=flatpak run ru.linux_gaming.PortProton /} PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${line1//Exec=flatpak run ru.linux_gaming.PortProton /}
...@@ -633,7 +633,7 @@ else ...@@ -633,7 +633,7 @@ else
PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /} PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]=${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]//Exec=env \"$PORT_SCRIPTS_PATH\/start.sh\" /}
sed -i "s|Exec=env \"$PORT_SCRIPTS_PATH/start.sh\"|Exec=flatpak run ru.linux_gaming.PortProton|" "$desktop_file" sed -i "s|Exec=env \"$PORT_SCRIPTS_PATH/start.sh\"|Exec=flatpak run ru.linux_gaming.PortProton|" "$desktop_file"
fi fi
while IFS=' ' read -r -a line2 ; do while read -r -a line2 ; do
if [[ \"${line2[0]//#@_@#/ }\" == "${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]}" ]] ; then if [[ \"${line2[0]//#@_@#/ }\" == "${PW_NAME_D_ICON["$AMOUNT_GENERATE_BUTTONS"]}" ]] ; then
PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=${line2[2]} PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]=${line2[2]}
break break
...@@ -758,7 +758,7 @@ else ...@@ -758,7 +758,7 @@ else
# AI_TOP_GAMES используется для сортировки автоинсталлов (работает на эмуляторы тоже) # AI_TOP_GAMES используется для сортировки автоинсталлов (работает на эмуляторы тоже)
AI_AMOUNT_GAMES="0" && AI_AMOUNT_EMULS="0" && AI_AMOUNT_ARRAY="0" AI_AMOUNT_GAMES="0" && AI_AMOUNT_EMULS="0" && AI_AMOUNT_ARRAY="0"
for ai_file in "$PORT_SCRIPTS_PATH"/pw_autoinstall/* ; do for ai_file in "$PORT_SCRIPTS_PATH"/pw_autoinstall/* ; do
while IFS= read -r line ; do while read -r line ; do
[[ $line =~ "##########" ]] && break [[ $line =~ "##########" ]] && break
[[ $line =~ "# type: " ]] && AI_TYPE["$AI_AMOUNT_ARRAY"]="${line//# type: /}" [[ $line =~ "# type: " ]] && AI_TYPE["$AI_AMOUNT_ARRAY"]="${line//# type: /}"
[[ $line =~ "# name: " ]] && AI_NAME["$AI_AMOUNT_ARRAY"]="${line//# name: /}" [[ $line =~ "# name: " ]] && AI_NAME["$AI_AMOUNT_ARRAY"]="${line//# name: /}"
......
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