Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/.util/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,17 @@ function util::tools::cf::install() {
exit 1
esac

# Check if cf already exists in the target directory or system PATH
if [[ -f "${dir}/cf" ]] || command -v cf >/dev/null 2>&1; then
util::print::title "CF CLI already installed (using system version)"
cf version
return 0
fi

if [[ ! -f "${dir}/cf" ]]; then
util::print::title "Installing cf"

curl "https://packages.cloudfoundry.org/stable?release=${os}-binary&version=6.49.0&source=github-rel" \
curl "https://packages.cloudfoundry.org/stable?release=${os}-binary&source=github-rel" \
--silent \
--location \
--output /tmp/cf.tar.gz
Expand Down
Loading