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
Vladislav
PortWINE
Commits
fbfe24b6
Commit
fbfe24b6
authored
Jul 17, 2024
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Htylol-modern-try-copy' into devel
parents
df5d1b26
01d50578
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
functions_helper
data_from_portwine/scripts/functions_helper
+28
-2
start.sh
data_from_portwine/scripts/start.sh
+1
-1
No files found.
data_from_portwine/scripts/functions_helper
View file @
fbfe24b6
...
...
@@ -125,6 +125,13 @@ export -f generate_pot
try_copy_file
()
{
if
[[
!
-f
"
$1
"
]]
;
then
print_info
"file
$1
not found for copy"
&&
return
1
elif
[[
-z
"
$2
"
]]
;
then
print_error
"no way to copy file
$1
"
&&
return
1
elif
[[
-L
"
$2
"
]]
;
then
print_warning
"
$2
is a file with a symbolic link"
try_remove_file
"
$2
"
cp
-f
"
$1
"
"
$2
"
&&
return
0
||
return
1
elif
[[
-f
"
$2
.sha256sum"
]]
;
then
print_warning
"
$2
this file has sha256sum"
try_remove_file
"
$2
"
try_remove_file
"
$2
.sha256sum"
cp
-f
"
$1
"
"
$2
"
&&
return
0
||
return
1
else
[[
-e
"
$2
/
$(
basename
"
$1
"
)
"
]]
&&
rm
-f
"
$2
/
$(
basename
"
$1
"
)
"
cp
-f
"
$1
"
"
$2
"
&&
return
0
||
return
1
...
...
@@ -135,6 +142,20 @@ export -f try_copy_file
try_copy_file_with_checksums
()
{
if
[[
!
-f
"
$1
"
]]
;
then
print_info
"file
$1
not found for copy"
&&
return
1
elif
[[
-z
"
$2
"
]]
;
then
print_error
"no way to copy file
$1
"
&&
return
1
elif
[[
-L
"
$2
"
]]
;
then
print_warning
"
$2
is a file with a symbolic link"
try_remove_file
"
$2
"
if
cp
-f
"
$1
"
"
$2
"
;
then
if
[[
"
${
PW_FILESYSTEM
}
"
==
"ext2/ext3"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
==
"f2fs"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
!=
"btrfs"
]]
then
checksum1
=(
$(
sha256sum
"
$1
"
)
)
echo
"
${
checksum1
[0]
}
"
>
"
$2
.sha256sum"
fi
return
0
else
return
1
fi
else
if
[[
"
${
PW_FILESYSTEM
}
"
==
"ext2/ext3"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
==
"f2fs"
]]
\
...
...
@@ -210,8 +231,13 @@ create_new_dir () {
}
try_force_link_file
()
{
if
[
!
-f
"
$1
"
]
;
then
print_warning
"file not found for link:
$1
"
elif
[
-z
"
$2
"
]
;
then
print_error
"no way to link file
$1
"
if
[[
!
-f
"
$1
"
]]
;
then
print_warning
"file not found for link:
$1
"
&&
return
1
elif
[[
-z
"
$2
"
]]
;
then
print_error
"no way to link file
$1
"
&&
return
1
elif
[[
-f
"
$2
.sha256sum"
]]
;
then
print_warning
"
$2
this file has sha256sum"
try_remove_file
"
$2
"
try_remove_file
"
$2
.sha256sum"
ln
-s
-f
-r
"
$1
"
"
$2
"
return
0
else
try_remove_file
"
$2
"
ln
-s
-f
-r
"
$1
"
"
$2
"
...
...
data_from_portwine/scripts/start.sh
View file @
fbfe24b6
...
...
@@ -239,11 +239,11 @@ if [[ "${SKIP_CHECK_UPDATES}" != 1 ]] ; then
export
VULKAN_DRIVER_NAME GET_GPU_NAMES
else
if
!
command
-v
vulkaninfo &>/dev/null
;
then
print_warning
"use portable vulkaninfo"
$PW_PLUGINS_PATH
/portable/bin/x86_64-linux-gnu-vulkaninfo 2>/dev/null
>
"
${
PW_TMPFS_PATH
}
/vulkaninfo.tmp"
VULKAN_DRIVER_NAME
=
"
$(
grep
-e
'driverName'
"
${
PW_TMPFS_PATH
}
/vulkaninfo.tmp"
|
awk
'{print$3}'
|
head
-1
)
"
GET_GPU_NAMES
=
$(
awk
-F
'='
'/deviceName/{print $2}'
"
${
PW_TMPFS_PATH
}
/vulkaninfo.tmp"
|
sed
'/llvm/d'
|
sort
-u
|
sed
's/^ //'
|
paste
-sd
'!'
)
export
VULKAN_DRIVER_NAME GET_GPU_NAMES
print_warning
"use portable vulkaninfo"
else
yad_error
"vulkaninfo - broken!"
fi
...
...
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