Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE-old
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
Vladislav
PortWINE-old
Commits
2f9f705d
Commit
2f9f705d
authored
Sep 28, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added background_pid
parent
4bee332d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
functions_helper
data_from_portwine/scripts/functions_helper
+26
-5
start.sh
data_from_portwine/scripts/start.sh
+1
-3
No files found.
data_from_portwine/scripts/functions_helper
View file @
2f9f705d
...
...
@@ -675,6 +675,31 @@ check_flatpak () {
}
export -f check_flatpak
background_pid () {
local arg1=
$1
# --start или --end
local arg2=
$2
# Название команды
local arg3=
$3
# Номер процесса (1,2,3..)
get_bg_pid () {
eval "
echo
\
${
$1
}
"
}
if [[ "
$arg1
" == --start ]] ; then
eval "
$arg2
&
"
PID=
$!
export bg_pid"
${
arg3
}
"="
$PID
"
elif [[ "
$arg1
" == --end ]] ; then
PID=
$(
get_bg_pid bg_pid
"
${
arg3
}
"
)
[[
$PID
== "" ]] && return 1
while true ; do
if [[ !
$(
jobs
-p
)
=~
$PID
]] ; then
return 0
fi
sleep 0.005
done
fi
}
export -f background_pid
unpack () {
case
$1
in
*.tar.xz) local command="
tar
-Jxhf
";;
...
...
@@ -1952,11 +1977,7 @@ pw_skip_update () {
pw_skip_update_new () {
if [[ "${SKIP_CHECK_UPDATES_NEW}" != "1" ]] ; then
while true ; do
if [[ ! $(jobs -p) =~ $PID_SKIP_UPDATE ]] ; then
break
fi
done
background_pid --end "pw_skip_update" "1"
if [[ -f "${PW_TMPFS_PATH}/gamescope.tmp" ]] ; then
export GAMESCOPE_INSTALLED="1"
...
...
data_from_portwine/scripts/start.sh
View file @
2f9f705d
...
...
@@ -267,9 +267,7 @@ if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then
PW_FILESYSTEM
=
$(
stat
-f
-c
%T
"
${
PORT_WINE_PATH
}
"
)
export
PW_FILESYSTEM
pw_skip_update &
PID_SKIP_UPDATE
=
$(
jobs
-p
)
export
PID_SKIP_UPDATE
=
"
${
PID_SKIP_UPDATE
//*[[
:space:]]/
}
"
background_pid
--start
"pw_skip_update"
"1"
fi
# create lock file
...
...
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