forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
anonymous curl works better, auth fails
- Loading branch information
andrew-jameson
committed
Oct 9, 2024
1 parent
bbdd80f
commit 002d4f6
Showing
1 changed file
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
#!/bin/sh | ||
set -e | ||
if command -v cf /dev/null 2>&1; then | ||
if command -v cfx /dev/null 2>&1; then | ||
echo The command cf is available | ||
else | ||
# using curl, i want to download from our nexus host at https://tdp-nexus.dev.raftlabs.tech with | ||
# path /#browse/browse:tdp-bin:cloudfoundry-cli to download this file: "cloudfoundry-cli/cf7-cli_7.7.13_linux_x86-64.tgz" | ||
# using the credentials $NEXUS_USER and $NEXUS_PASS | ||
# and then extract the file and move it to /usr/local/bin/cf | ||
# and then make it executable | ||
NEXUS_ARCHIVE="cf7-cli_7.7.13_linux_x86-64.tgz" | ||
NEXUS_URL="https://tdp-nexus.dev.raftlabs.tech/repository/tdp-bin/cloudfoundry-cli/$NEXUS_ARCHIVE" | ||
#curl -u $NEXUS_USER:$NEXUS_PASS $NEXUS_URL -o $NEXUS_ARCHIVE | ||
curl $NEXUS_URL -o $NEXUS_ARCHIVE | ||
tar xzf $NEXUS_ARCHIVE #&& rm -f $NEXUS_ARCHIVE | ||
mv ./cf /usr/local/bin/ | ||
chmod +x /usr/local/bin/cf | ||
|
||
apt-get update | ||
apt-get install wget gnupg2 apt-transport-https | ||
# apt-get update | ||
# apt-get install wget gnupg2 apt-transport-https | ||
|
||
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - | ||
# wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - | ||
|
||
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list | ||
# echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list | ||
|
||
apt-get update | ||
apt-get install cf7-cli | ||
# apt-get update | ||
# apt-get install cf7-cli | ||
|
||
fi |