| 
									
										
										
										
											2019-05-03 19:12:59 +08:00
										 |  |  | #! /bin/sh
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HERE=`dirname $0` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | for f in "$@"; do | 
					
						
							|  |  |  |     # It's worth nothing that 'openssl sha256 -r' assumes that all input | 
					
						
							|  |  |  |     # is binary.  This isn't quite true, and we know better, so we convert | 
					
						
							|  |  |  |     # the '*stdin' marker to the filename preceded by a space.  See the | 
					
						
							|  |  |  |     # sha1sum manual for a specification of the format. | 
					
						
							|  |  |  |     case "$f" in | 
					
						
							| 
									
										
										
										
											2021-05-20 11:48:15 +08:00
										 |  |  |         *.c | *.c.in | *.h | *.h.in | *.inc) | 
					
						
							| 
									
										
										
										
											2019-05-03 19:12:59 +08:00
										 |  |  |             cat "$f" \
 | 
					
						
							|  |  |  |                 | $HERE/lang-compress.pl 'C' \
 | 
					
						
							| 
									
										
										
										
											2021-05-04 18:28:42 +08:00
										 |  |  |                 | unifdef -DFIPS_MODULE=1 \
 | 
					
						
							| 
									
										
										
										
											2019-05-03 19:12:59 +08:00
										 |  |  |                 | openssl sha256 -r \
 | 
					
						
							|  |  |  |                 | sed -e "s| \\*stdin|  $f|" | 
					
						
							|  |  |  |             ;; | 
					
						
							| 
									
										
										
										
											2021-08-19 19:05:15 +08:00
										 |  |  |         *.pl ) | 
					
						
							| 
									
										
										
										
											2019-05-03 19:12:59 +08:00
										 |  |  |             cat "$f" \
 | 
					
						
							|  |  |  |                 | $HERE/lang-compress.pl 'perl' \
 | 
					
						
							|  |  |  |                 | openssl sha256 -r \
 | 
					
						
							|  |  |  |                 | sed -e "s| \\*stdin|  $f|" | 
					
						
							|  |  |  |             ;; | 
					
						
							| 
									
										
										
										
											2021-08-19 19:05:15 +08:00
										 |  |  |         *.S ) | 
					
						
							| 
									
										
										
										
											2019-05-03 19:12:59 +08:00
										 |  |  |             cat "$f" \
 | 
					
						
							|  |  |  |                 | $HERE/lang-compress.pl 'S' \
 | 
					
						
							|  |  |  |                 | openssl sha256 -r \
 | 
					
						
							|  |  |  |                 | sed -e "s| \\*stdin|  $f|" | 
					
						
							|  |  |  |             ;; | 
					
						
							|  |  |  |     esac | 
					
						
							|  |  |  | done |