11cb0ef41Sopenharmony_ci#! /bin/sh 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciHERE=`dirname $0` 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_cifor f in "$@"; do 61cb0ef41Sopenharmony_ci # It's worth nothing that 'openssl sha256 -r' assumes that all input 71cb0ef41Sopenharmony_ci # is binary. This isn't quite true, and we know better, so we convert 81cb0ef41Sopenharmony_ci # the '*stdin' marker to the filename preceded by a space. See the 91cb0ef41Sopenharmony_ci # sha1sum manual for a specification of the format. 101cb0ef41Sopenharmony_ci case "$f" in 111cb0ef41Sopenharmony_ci *.c | *.c.in | *.h | *.h.in | *.inc) 121cb0ef41Sopenharmony_ci cat "$f" \ 131cb0ef41Sopenharmony_ci | $HERE/lang-compress.pl 'C' \ 141cb0ef41Sopenharmony_ci | unifdef -DFIPS_MODULE=1 \ 151cb0ef41Sopenharmony_ci | openssl sha256 -r \ 161cb0ef41Sopenharmony_ci | sed -e "s| \\*stdin| $f|" 171cb0ef41Sopenharmony_ci ;; 181cb0ef41Sopenharmony_ci *.pl ) 191cb0ef41Sopenharmony_ci cat "$f" \ 201cb0ef41Sopenharmony_ci | $HERE/lang-compress.pl 'perl' \ 211cb0ef41Sopenharmony_ci | openssl sha256 -r \ 221cb0ef41Sopenharmony_ci | sed -e "s| \\*stdin| $f|" 231cb0ef41Sopenharmony_ci ;; 241cb0ef41Sopenharmony_ci *.S ) 251cb0ef41Sopenharmony_ci cat "$f" \ 261cb0ef41Sopenharmony_ci | $HERE/lang-compress.pl 'S' \ 271cb0ef41Sopenharmony_ci | openssl sha256 -r \ 281cb0ef41Sopenharmony_ci | sed -e "s| \\*stdin| $f|" 291cb0ef41Sopenharmony_ci ;; 301cb0ef41Sopenharmony_ci esac 311cb0ef41Sopenharmony_cidone 32