Update install-imgcrypt to allow change install repo
Add repo env similar to other install script Signed-off-by: Jing Xu <jinxu@google.com>
This commit is contained in:
		
				
					committed by
					
						
						k8s-infra-cherrypick-robot
					
				
			
			
				
	
			
			
			
						parent
						
							29be12a668
						
					
				
				
					commit
					0785bd8cc6
				
			@@ -23,9 +23,10 @@ set -eu -o pipefail
 | 
			
		||||
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
 | 
			
		||||
 | 
			
		||||
: "${IMGCRYPT_VERSION:=$(cat "${script_dir}/imgcrypt-version")}"
 | 
			
		||||
: "${IMGCRYPT_REPO:=https://github.com/containerd/imgcrypt.git}" # Default repo
 | 
			
		||||
 | 
			
		||||
TMPROOT=$(mktemp -d)
 | 
			
		||||
git clone https://github.com/containerd/imgcrypt.git "${TMPROOT}"/imgcrypt
 | 
			
		||||
git clone "${IMGCRYPT_REPO}" "${TMPROOT}"/imgcrypt
 | 
			
		||||
pushd "${TMPROOT}"/imgcrypt
 | 
			
		||||
git checkout "${IMGCRYPT_VERSION}"
 | 
			
		||||
make
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user