mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 01:05:26 +01:00 
			
		
		
		
	 b705188599
			
		
	
	b705188599
	
	
	
		
			
			Reviewed-on: https://gitea.com/gitea/tea/pulls/536 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-committed-by: techknowlogick <techknowlogick@gitea.io>
		
			
				
	
	
		
			12 lines
		
	
	
		
			192 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			192 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| set -e
 | |
| 
 | |
| if [ -z "$1" ]; then
 | |
|   echo "usage: $0 <path>"
 | |
|   exit 1
 | |
| fi
 | |
| 
 | |
| SUM=$(shasum -a 256 "$1" | cut -d' ' -f1)
 | |
| BASENAME=$(basename "$1")
 | |
| echo -n "${SUM}  ${BASENAME}" > "$1".sha256 |