fn: sgnd_header_calc_checksum
Purpose
Hash a script while excluding its mutable metadata checksum fields.
Description
Excludes Version, Build and Checksum entries within the Metadata header section from the hashed input.
Arguments
$1— Readable source path.
Output
Writes a SHA-256 digest without changing the file.
Returns
- 0 after hashing; 1 if the file is unreadable.
Usage
sgnd_header_calc_checksum "$source_file"
