Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortWINE
Commits
cede8465
Commit
cede8465
authored
Sep 24, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated updates
parent
17a2a21e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
17 deletions
+41
-17
functions_helper
data_from_portwine/scripts/functions_helper
+40
-16
start.sh
data_from_portwine/scripts/start.sh
+1
-1
No files found.
data_from_portwine/scripts/functions_helper
View file @
cede8465
...
...
@@ -22,11 +22,10 @@ print_wrapped () {
local
text
=
"
$1
"
local
a
=
"0"
local
b
=
"
$2
"
local
c
=
"
$3
"
if
[[
-n
"
$
c
"
]]
;
then
if
[[
-n
"
$
3
"
]]
;
then
if
((
${#
text
}
>
b
))
;
then
echo
"
${
text
:a:b
}${
c
}
"
echo
"
${
text
:a:b
}${
3
}
"
else
echo
"
$text
"
fi
...
...
@@ -1700,7 +1699,6 @@ pw_port_update () {
if [[ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ]] ; then
echo "2024" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi
scripts_install_ver=$(<"${PORT_WINE_TMP_PATH}/scripts_ver")
URL_ETERFUND="https://gitlab.eterfund.ru/Castro-Fidel/PortWINE/raw/${BRANCH}/data_from_portwine/scripts/var"
URL_GITHUB="https://raw.githubusercontent.com/Castro-Fidel/PortWINE/${BRANCH}/data_from_portwine/scripts/var"
...
...
@@ -1750,8 +1748,12 @@ pw_port_update () {
echo "$UPDATE_DAYS $UPDATE_MINUTES UPDATE_GITHUB $UPDATE_MINUTES" > "${PORT_WINE_TMP_PATH}/update_skip_mirror"
UPDATE_URL_MIRROR="UPDATE_GITHUB"
fi
PW_FORCE_UPDATE="1"
}
[[ ! -f "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ]] && echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
scripts_update_not=$(<"${PORT_WINE_TMP_PATH}/scripts_update_notifier")
if [[ ! -f "${PORT_WINE_TMP_PATH}/update_skip_mirror" ]] ; then
pw_check_update
else
...
...
@@ -1761,16 +1763,27 @@ pw_port_update () {
UPDATE_SKIP_DATE="$(echo "${CHECK_UPDATE_MIRROR}" | awk -F" " '
{
print
$4
}
')"
UPDATE_DAYS=$(date +%-j)
UPDATE_MINUTES=$(($(date +%-H) * 60 + $(date +%-M)))
if [[ "${scripts_update_not}" != "0" ]] ; then
if (( $((UPDATE_DATE_MIRROR + 360)) <= UPDATE_MINUTES )) \
|| [[ "$UPDATE_SKIP_DAYS" != "$UPDATE_DAYS" ]] \
|| [[ "$PW_FORCE_UPDATE" == "1" ]]
then
|| [[ "$PW_FORCE_UPDATE" == "1" ]] ; then
pw_check_update
fi
else
if [[ "$UPDATE_SKIP_DAYS" != "$UPDATE_DAYS" ]] ; then
pw_check_update
else
return 0
fi
fi
fi
if (( $((UPDATE_SKIP_DATE + $(((RANDOM%11)+25)) )) <= UPDATE_MINUTES )) \
|| [[ -n "$PW_UPDATE_ALL_LIST" ]] ; then
|| [[ "$PW_FORCE_UPDATE" == "1" ]] \
|| [[ "${scripts_update_not}" == "2" ]] ; then
if [[ "${scripts_update_not}" == "2" ]] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
fi
print_info "Check update..."
echo ""
if [[ -z "$UPDATE_URL_MIRROR" ]] ; then
...
...
@@ -1801,11 +1814,20 @@ pw_port_update () {
return 0
fi
[[ "$LANGUAGE" == ru ]] && local PW_CHANGELOG_FILE="changelog_ru" || local PW_CHANGELOG_FILE="changelog_en"
[[ ! -f "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ]] && echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
read "scripts_update_not" < "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
if [[ "${scripts_update_not}" == "1" ]] ; then
scripts_current_ver=$(grep "$BRANCH_VERSION_UPDATE" "${PORT_WINE_TMP_PATH}/curent_var_ver" | awk -F "=" '
{
print
$2
}
')
if [[ ! -f "${PORT_WINE_TMP_PATH}/update_remind_later" ]] ; then
echo "$scripts_current_ver" > "${PORT_WINE_TMP_PATH}/update_remind_later"
else
PW_REMIND_LATER=$(<"${PORT_WINE_TMP_PATH}/update_remind_later")
if [[ $PW_REMIND_LATER != "$scripts_current_ver" ]] ; then
echo "2" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
echo "$scripts_current_ver" > "${PORT_WINE_TMP_PATH}/update_remind_later"
scripts_update_not=$(<"${PORT_WINE_TMP_PATH}/scripts_update_notifier")
fi
fi
if [[ "${scripts_update_not}" == [12] ]] ; then
[[ "$LANGUAGE" == ru ]] && local PW_CHANGELOG_FILE="changelog_ru" || local PW_CHANGELOG_FILE="changelog_en"
print_info "Scripts version in git = ${scripts_current_ver}"
print_info "Scripts version local = ${scripts_install_ver}"
if [[ -n "${scripts_current_ver}" ]] && [[ "${scripts_current_ver}" -gt "${scripts_install_ver}" ]] ; then
...
...
@@ -1832,8 +1854,10 @@ pw_port_update () {
# --button="${translations[EXIT]}"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"":252 \
case "${YAD_STATUS}" in
1|252) exit 0 ;;
try_remove_file "${PORT_WINE_TMP_PATH}/curent_var_ver"
case ${YAD_STATUS} in
1|252) echo "2" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier" && exit 0 ;;
16) xcsd="${translations[DO NOT REMIND ME]}" ;;
18) xcsd="${translations[REMIND ME LATER]}" ;;
20) xcsd="${translations[UPDATING NOW]}" ;;
...
...
@@ -1864,14 +1888,12 @@ pw_port_update () {
yad_error_download && pw_port_update || exit 1
fi ;;
"${translations[REMIND ME LATER]}")
echo "
" ;;
echo "
2" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier
" ;;
"${translations[DO NOT REMIND ME]}")
echo "0" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ;;
esac
fi
fi
export scripts_install_ver
try_remove_file "${PORT_WINE_TMP_PATH}/curent_var_ver"
return 0
}
...
...
@@ -5761,6 +5783,7 @@ change_branch () {
pw_notify_send
-i
info
\
"
${
translations
[Branch changed to
:]
}
"
"<b>DEVEL</b>"
unset
SKIP_CHECK_UPDATES
export
PW_FORCE_UPDATE
=
"1"
fi
else
if
yad_question
"
${
translations
[Do you actually want to change the scripts version to
:]
}
<b>STABLE?</b>"
;
then
...
...
@@ -5770,6 +5793,7 @@ change_branch () {
pw_notify_send
-i
info
\
"
${
translations
[Branch changed to
:]
}
"
"<b>STABLE</b>"
unset
SKIP_CHECK_UPDATES
export
PW_FORCE_UPDATE
=
"1"
fi
fi
print_info
"Restarting PP for change branch..."
...
...
data_from_portwine/scripts/start.sh
View file @
cede8465
...
...
@@ -169,7 +169,7 @@ export PW_WINELIB="${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}"
try_remove_dir
"
${
PW_WINELIB
}
/var"
install_ver
=
"
$(
<
"
${
PORT_WINE_TMP_PATH
}
/PortProton_ver"
)
"
export
install_ver
scripts_install_ver
=
$(
<
"
${
PORT_WINE_TMP_PATH
}
/scripts_ver"
)
scripts_install_ver
=
"
$(
<
"
${
PORT_WINE_TMP_PATH
}
/scripts_ver"
)
"
export
scripts_install_ver
export
WINETRICKS_DOWNLOADER
=
"curl"
export
USER_CONF
=
"
${
PORT_WINE_PATH
}
/data/user.conf"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment