From 0785bd8cc6405b346a81025c983365825910e77f Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Sun, 17 Nov 2024 18:16:12 -0800 Subject: [PATCH] Update install-imgcrypt to allow change install repo Add repo env similar to other install script Signed-off-by: Jing Xu --- script/setup/install-imgcrypt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/setup/install-imgcrypt b/script/setup/install-imgcrypt index ec2640374..108a14b0c 100755 --- a/script/setup/install-imgcrypt +++ b/script/setup/install-imgcrypt @@ -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