added USE_ONLY_LG_RU=1 for use only linux-gaming.ru for all updates

This commit is contained in:
Mikhail Tergoev
2025-06-14 19:30:17 +03:00
parent 68ac3ae133
commit cbc2edea62
2 changed files with 27 additions and 18 deletions

View File

@ -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,6 +2487,7 @@ pw_port_update () {
URL_PP_GITEA="https://git.linux-gaming.ru/CastroFidel/PortWINE/raw/branch/${BRANCH}/data_from_portwine/scripts/var"
pw_check_update () {
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
@ -2502,6 +2503,10 @@ pw_port_update () {
UPDATE_SKIP_GITHUB="1"
fi
debug_timer --end -s "UPDATE_GITHUB"
else
UPDATE_SKIP_ETERFUND="1"
UPDATE_SKIP_GITHUB="1"
fi
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"

View File

@ -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