File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4+ sha256_file () {
5+ if command -v sha256sum > /dev/null 2>&1 ; then
6+ sha256sum " $1 " | awk ' {print $1}'
7+ return
8+ fi
9+ if command -v shasum > /dev/null 2>&1 ; then
10+ shasum -a 256 " $1 " | awk ' {print $1}'
11+ return
12+ fi
13+ if command -v openssl > /dev/null 2>&1 ; then
14+ openssl dgst -sha256 " $1 " | awk ' {print $NF}'
15+ return
16+ fi
17+ echo " error: no SHA-256 tool available (need sha256sum, shasum, or openssl)" >&2
18+ exit 1
19+ }
20+
421zig build -Doptimize=ReleaseFast > /dev/null
522
623output=$( ./zig-out/bin/compact-pro --help)
@@ -196,7 +213,7 @@ mkdir -p "$tmp_dir/out-lzh"
196213[[ -f " $tmp_dir /out-lzh/._MacEnvy" ]]
197214[[ " $( wc -c < " $tmp_dir /out-lzh/MacEnvy" | tr -d ' [:space:]' ) " == " 0" ]]
198215[[ " $( wc -c < " $tmp_dir /out-lzh/._MacEnvy" | tr -d ' [:space:]' ) " == " 36336" ]]
199- [[ " $( shasum -a 256 " $tmp_dir /out-lzh/._MacEnvy" | awk ' {print $1} ' ) " == " 7168936e8b51b8e5eb5ea029cc7ab4b43d126c0a0c6ef811623e7872eae8f7cb" ]]
216+ [[ " $( sha256_file " $tmp_dir /out-lzh/._MacEnvy" ) " == " 7168936e8b51b8e5eb5ea029cc7ab4b43d126c0a0c6ef811623e7872eae8f7cb" ]]
200217
201218if command -v unar > /dev/null 2>&1 ; then
202219 awk ' BEGIN{srand(12345); n=6*1024*1024; for(i=0;i<n;i++){c=65+int(rand()*8); printf "%c", c}}' > " $tmp_dir /unar-multiblock.txt"
You can’t perform that action at this time.
0 commit comments