mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	install-shellcheck: Check the tarball’s SHA-256 hash.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							3b3f9b0b8a
						
					
				
				
					commit
					9d75eb0ad5
				
			@@ -2,6 +2,8 @@
 | 
			
		||||
set -eu
 | 
			
		||||
 | 
			
		||||
version=0.7.0
 | 
			
		||||
tarball="shellcheck-v$version.linux.x86_64.tar.xz"
 | 
			
		||||
sha256=39c501aaca6aae3f3c7fc125b3c3af779ddbe4e67e4ebdc44c2ae5cba76c847f
 | 
			
		||||
 | 
			
		||||
if ! out="$(shellcheck --version 2>/dev/null)" || [[ "$out" != *"
 | 
			
		||||
version: $version
 | 
			
		||||
@@ -9,6 +11,7 @@ version: $version
 | 
			
		||||
    tmpdir="$(mktemp -d)"
 | 
			
		||||
    trap 'rm -r "$tmpdir"' EXIT
 | 
			
		||||
    cd "$tmpdir"
 | 
			
		||||
    wget -nv "https://storage.googleapis.com/shellcheck/shellcheck-v$version.linux.x86_64.tar.xz"
 | 
			
		||||
    tar -xJf "shellcheck-v$version.linux.x86_64.tar.xz" --no-same-owner --strip-components=1 -C /usr/local/bin "shellcheck-v$version/shellcheck"
 | 
			
		||||
    wget -nv "https://storage.googleapis.com/shellcheck/$tarball"
 | 
			
		||||
    sha256sum -c <<< "$sha256 $tarball"
 | 
			
		||||
    tar -xJf "$tarball" --no-same-owner --strip-components=1 -C /usr/local/bin "shellcheck-v$version/shellcheck"
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user