Skip to content

Commit 467c4be

Browse files
committed
[update] : Create checksum without cd
1 parent be2f204 commit 467c4be

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

build.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,10 @@ _cleanup_airootfs(){
315315
}
316316

317317
_mkchecksum() {
318-
local name="${1}"
319-
cd -- "${out_dir}"
320318
msg_info "Creating md5 checksum ..."
321-
md5sum "${1}" > "${1}.md5"
319+
echo "$(md5sum "${1}" | getclm 1) $(basename "${1}")" > "${1}.md5"
322320
msg_info "Creating sha256 checksum ..."
323-
sha256sum "${1}" > "${1}.sha256"
324-
cd -- "${OLDPWD}"
321+
echo "$(sha256sum "${1}" | getclm 1) $(basename "${1}")" > "${1}.sha256"
325322
}
326323

327324
# Check the value of a variable that can only be set to true or false.
@@ -1005,9 +1002,7 @@ make_prepare() {
10051002

10061003
# Create checksum
10071004
msg_info "Creating checksum file for self-test..."
1008-
cd -- "${isofs_dir}/${install_dir}/${arch}"
1009-
sha512sum airootfs.sfs > airootfs.sha512
1010-
cd -- "${OLDPWD}"
1005+
echo "$(sha512sum "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" | getclm 1) airootfs.sfs" > "${isofs_dir}/${install_dir}/${arch}/airootfs.sha512"
10111006
msg_info "Done!"
10121007

10131008
# Sign with gpg

0 commit comments

Comments
 (0)