| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | fiat_crypto="$1" |
| 6 | |
| 7 | if [scip-shell system . . `[`. -z "${fiat_crypto}" ]; then |
| 8 | printfscip-shell system . . printf. "USAGE: %s /path/to/fiat_crypto\n" "$0" |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
| 12 | echoscip-shell system . . echo. "::group::fiat_crypto" |
| 13 | "${fiat_crypto}" -h |
| 14 | echoscip-shell system . . echo. "::endgroup::" |
| 15 | for prog in word-by-word-montgomery unsaturated-solinas saturated-solinas base-conversion; do |
| 16 | echoscip-shell system . . echo. "::group::$prog" |
| 17 | "${fiat_crypto}" $prog -h |
| 18 | echoscip-shell system . . echo. "::endgroup::" |
| 19 | lang_line="$("${fiat_crypto}" $prog -h | grepscip-shell system . . grep. -- --lang)" |
| 20 | echoscip-shell system . . echo. "::group::$prog bedrock2 check" |
| 21 | search='[Bb]edrock2' |
| 22 | printfscip-shell system . . printf. "%s\n" "${lang_line}" | grepscip-shell system . . grep. -q "$search" || { printfscip-shell system . . printf. "::error::Missing %s in %s\n" "${search}" "${lang_line}"; exit 1; } |
| 23 | echoscip-shell system . . echo. "::endgroup::" |
| 24 | echoscip-shell system . . echo. "::group::$prog default C check" |
| 25 | search='Defaults to C if' |
| 26 | printfscip-shell system . . printf. "%s\n" "${lang_line}" | grepscip-shell system . . grep. -q "$search" || { printfscip-shell system . . printf. "::error::Missing %s in %s\n" "${search}" "${lang_line}"; exit 1; } |
| 27 | echoscip-shell system . . echo. "::endgroup::" |
| 28 | done |