Fix check_file returning success on missing file.
parent
a0920a6f87
commit
04ee881943
|
@ -66,7 +66,7 @@ remove_file() {
|
||||||
check_file() {
|
check_file() {
|
||||||
local path="$1" sha256hash="${2:-}"
|
local path="$1" sha256hash="${2:-}"
|
||||||
if [ ! -f "$path" ]; then
|
if [ ! -f "$path" ]; then
|
||||||
return
|
return 1
|
||||||
fi
|
fi
|
||||||
sha256sum -c - <<< "${sha256hash} ${path}" >/dev/null 2>/dev/null
|
sha256sum -c - <<< "${sha256hash} ${path}" >/dev/null 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue