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
cfe39e74
Commit
cfe39e74
authored
Aug 03, 2024
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update try_copy_file_with_checksums, spellcheck fix
parent
43162d03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
functions_helper
data_from_portwine/scripts/functions_helper
+9
-9
No files found.
data_from_portwine/scripts/functions_helper
View file @
cfe39e74
...
...
@@ -145,8 +145,8 @@ try_copy_file_with_checksums () {
||
[[
"
${
PW_FILESYSTEM
}
"
==
"f2fs"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
!=
"btrfs"
]]
then
checksum1
=
(
$(
sha256sum
"
$1
"
)
)
echo
"
${
checksum1
[0]
}
"
>
"
$2
.sha256sum"
checksum1
=
"
$(
sha256sum
"
$1
"
)
"
echo
"
${
checksum1
// */
}
"
>
"
$2
.sha256sum"
fi
return
0
else
...
...
@@ -157,28 +157,28 @@ try_copy_file_with_checksums () {
||
[[
"
${
PW_FILESYSTEM
}
"
==
"f2fs"
]]
\
||
[[
"
${
PW_FILESYSTEM
}
"
!=
"btrfs"
]]
then
checksum1
=
(
$(
sha256sum
"
$1
"
)
)
checksum1
=
"
$(
sha256sum
"
$1
"
)
"
if
[[
!
-f
"
$2
"
]]
;
then
if
cp
-f
"
$1
"
"
$2
"
;
then
echo
"
${
checksum1
[0]
}
"
>
"
$2
.sha256sum"
echo
"
${
checksum1
// */
}
"
>
"
$2
.sha256sum"
return
0
else
return
1
fi
else
if
[[
!
-f
"
$2
.sha256sum"
]]
;
then
checksum2
=
(
$(
sha256sum
"
$2
"
)
)
echo
"
${
checksum2
[0]
}
"
>
"
$2
.sha256sum"
checksum2
=
"
$(
sha256sum
"
$2
"
)
"
echo
"
${
checksum2
// */
}
"
>
"
$2
.sha256sum"
else
checksum2
=
$(
<
"
$2
.sha256sum"
)
checksum2
=
"
$(
<
"
$2
.sha256sum"
)
"
fi
fi
if
[[
"
${
checksum1
[0]
}
"
==
"
${
checksum2
[0]
}
"
]]
;
then
if
[[
"
${
checksum1
// */
}
"
==
"
${
checksum2
// */
}
"
]]
;
then
return
0
else
try_remove_file
"
$2
"
if
cp
-f
"
$1
"
"
$2
"
;
then
echo
"
${
checksum1
[0]
}
"
>
"
$2
.sha256sum"
echo
"
${
checksum1
// */
}
"
>
"
$2
.sha256sum"
return
0
else
return
1
...
...
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