From cbc2edea6249742741a52841a748a10d82254a05 Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Sat, 14 Jun 2025 19:30:17 +0300 Subject: [PATCH] added USE_ONLY_LG_RU=1 for use only linux-gaming.ru for all updates --- data_from_portwine/scripts/functions_helper | 31 ++++++++++++--------- data_from_portwine/scripts/start.sh | 14 ++++++---- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index dc58a671..c27d5ba7 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -2477,7 +2477,7 @@ pw_port_update () { if [[ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ]] \ || [[ ! $BRANCH =~ (devel|master) ]]; then - echo "2024" > "${PORT_WINE_TMP_PATH}/scripts_ver" + echo "2025" > "${PORT_WINE_TMP_PATH}/scripts_ver" BRANCH_VERSION_UPDATE="SCRIPTS_STABLE_VERSION" BRANCH="master" fi @@ -2487,21 +2487,26 @@ pw_port_update () { URL_PP_GITEA="https://git.linux-gaming.ru/CastroFidel/PortWINE/raw/branch/${BRANCH}/data_from_portwine/scripts/var" pw_check_update () { - debug_timer --start -s "UPDATE_ETERFUND" - if ! timeout 2 curl -f -s --list-only "$URL_ETERFUND" > "${PORT_WINE_TMP_PATH}/curent_var_ver" - then - print_warning "https://gitlab.eterfund.ru/ broken. Skip it..." - UPDATE_SKIP_ETERFUND="1" - fi - debug_timer --end -s "UPDATE_ETERFUND" + if [[ $USE_ONLY_LG_RU != "1" ]] ; then + debug_timer --start -s "UPDATE_ETERFUND" + if ! timeout 2 curl -f -s --list-only "$URL_ETERFUND" > "${PORT_WINE_TMP_PATH}/curent_var_ver" + then + print_warning "https://gitlab.eterfund.ru/ broken. Skip it..." + UPDATE_SKIP_ETERFUND="1" + fi + debug_timer --end -s "UPDATE_ETERFUND" - debug_timer --start -s "UPDATE_GITHUB" - if ! timeout 2 curl -f -s --list-only "$URL_GITHUB" > "${PORT_WINE_TMP_PATH}/curent_var_ver" - then - print_warning "https://raw.githubusercontent.com/ broken. Skip it..." + debug_timer --start -s "UPDATE_GITHUB" + if ! timeout 2 curl -f -s --list-only "$URL_GITHUB" > "${PORT_WINE_TMP_PATH}/curent_var_ver" + then + print_warning "https://raw.githubusercontent.com/ broken. Skip it..." + UPDATE_SKIP_GITHUB="1" + fi + debug_timer --end -s "UPDATE_GITHUB" + else + UPDATE_SKIP_ETERFUND="1" UPDATE_SKIP_GITHUB="1" fi - debug_timer --end -s "UPDATE_GITHUB" debug_timer --start -s "UPDATE_PP_GITEA" if ! timeout 2 curl -f -s --list-only "$URL_PP_GITEA" > "${PORT_WINE_TMP_PATH}/curent_var_ver" diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index d488ae63..4f08a7e8 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -233,16 +233,20 @@ fi # choose mirror if [[ -z "$MIRROR" ]] \ -&& [[ "$LANGUAGE" == "ru" ]] \ -&& [[ "$BRANCH" != "devel" ]] +&& [[ "$LANGUAGE" == "ru" ]] then echo 'export MIRROR="CLOUD"' >> "$USER_CONF" - MIRROR="CLOUD" + export MIRROR="CLOUD" elif [[ -z "$MIRROR" ]] ; then echo 'export MIRROR="GITHUB"' >> "$USER_CONF" - MIRROR="GITHUB" + export MIRROR="GITHUB" +fi + +if [[ $USE_ONLY_LG_RU == "1" ]] ; then + export MIRROR="CLOUD" + edit_user_conf_from_gui MIRROR USE_ONLY_LG_RU + print_info "Force used linux-gaming.ru for all updates.\n" fi -export MIRROR print_info "The first mirror in used: $MIRROR\n" # choose downloading covers from SteamGridDB or not