File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,17 @@ variables:
2626before_script :
2727 # Setup trdl
2828 - |
29- if ! command -v trdl; then
30- echo "🔧 trdl is not installed, installing it..."
31-
32- export PATH=$PATH:~/bin
33- trdl_target_version=$(curl -s https://tuf.trdl.dev/targets/channels/0/stable)
34-
35- echo "🔍 Installing trdl version ${trdl_target_version} ..."
36- curl -sSLO "https://tuf.trdl.dev/targets/releases/$trdl_target_version/linux-amd64/bin/trdl"
37- install -D trdl ~/bin/trdl
38- rm trdl
29+ TRDL_ROOT="${HOME}/.trdl"
30+ trdl_target_version=$(curl -s https://tuf.trdl.dev/targets/channels/0/stable)
31+ TRDL_BIN="${TRDL_ROOT}/releases/${trdl_target_version}/trdl"
32+ if [[ ! -x "${TRDL_BIN}" ]]; then
33+ mkdir -p "${TRDL_ROOT}/releases/${trdl_target_version}"
34+ curl -sSLO "https://tuf.trdl.dev/targets/releases/${trdl_target_version}/linux-amd64/bin/trdl"
35+ mv trdl "${TRDL_BIN}"
36+ chmod +x "${TRDL_BIN}"
3937 fi
40-
38+ ln -sfn "releases/${trdl_target_version}" "${TRDL_ROOT}/current"
39+ export PATH="${TRDL_ROOT}/current:${PATH}"
4140
4241 # Setup werf
4342 - |
You can’t perform that action at this time.
0 commit comments