Skip to content

Commit

Permalink
make curl more robust
Browse files Browse the repository at this point in the history
Signed-off-by: MaxPeal <[email protected]>
  • Loading branch information
MaxPeal committed Sep 23, 2020
1 parent ac274db commit 649de08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions deploy/vagrant/scripts/tinkerbell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ setup_docker() (
gnupg-agent \
software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg |
sudo apt-key add -

local repo
repo=$(
printf "deb [arch=amd64] https://download.docker.com/linux/ubuntu %s stable" \
printf "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") %s stable" \
"$(lsb_release -cs)"
)
sudo add-apt-repository "$repo"
Expand All @@ -32,13 +32,13 @@ setup_docker() (

setup_docker_compose() (
# from https://docs.docker.com/compose/install/
DOCKER_COMPOSE_DOWNLOAD_LINK=${DOCKER_COMPOSE_DOWNLOAD_LINK:-https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)} # If variable not set or null, use default.
"${OSIE_DOWNLOAD_LINK}"
sudo curl -L \
local DOCKER_COMPOSE_DOWNLOAD_LINK=${DOCKER_COMPOSE_DOWNLOAD_LINK:-"https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)"} # If variable not set or null, use default.
sudo curl -C - -SLR --progress-bar \
"${DOCKER_COMPOSE_DOWNLOAD_LINK}" \
-o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
)

make_certs_writable() (
Expand Down
3 changes: 2 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ setup_osie() (
pushd "$SCRATCH"

if [ -z "${TB_OSIE_TAR:-}" ]; then
curl 'https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/latest.tar.gz' -o ./osie.tar.gz
local OSIE_DOWNLOAD_LINK=${OSIE_DOWNLOAD_LINK:-"https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/latest.tar.gz"} # If variable not set or null, use default.
curl -C - -SLR --progress-bar "${OSIE_DOWNLOAD_LINK}" -o ./osie.tar.gz
tar -zxf osie.tar.gz
else
tar -zxf "$TB_OSIE_TAR"
Expand Down

0 comments on commit 649de08

Please sign in to comment.