Merge branch 'update-checksums' of github.com:Htylol/PortWINE into Htylol-update-checksums
This commit is contained in:
commit
e54ceeb531
@ -143,8 +143,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
|
||||
@ -155,28 +155,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
|
||||
|
Loading…
Reference in New Issue
Block a user