parent
4c0799b592
commit
da31ae863b
|
@ -272,6 +272,7 @@ You can configure how `dctlenv` operates with the following settings:
|
||||||
| `DCTLENV_ARCH` | `amd64` | Architecture other than the default amd64 can be specified |
|
| `DCTLENV_ARCH` | `amd64` | Architecture other than the default amd64 can be specified |
|
||||||
| `DCTLENV_DEBUG` | `0` | Outputs debug information |
|
| `DCTLENV_DEBUG` | `0` | Outputs debug information |
|
||||||
| `DCTLENV_PGP` | `0` | Verify digital signatures |
|
| `DCTLENV_PGP` | `0` | Verify digital signatures |
|
||||||
|
| `DCTLENV_CURL` | `0` | Curl download progress bar, 0 will run a -# curl and 1 will run a -s curl |
|
||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
|
|
||||||
|
|
|
@ -41,12 +41,24 @@ case "$(uname -s)" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "${DCTLENV_CURL:-0}" in
|
||||||
|
0)
|
||||||
|
curl="-#"
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
curl="-s"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
log_error 'You can only set DCTLENV_CURL to 0 or 1'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
driftctl_url="https://github.com/cloudskiff/driftctl/releases/download"
|
driftctl_url="https://github.com/cloudskiff/driftctl/releases/download"
|
||||||
|
|
||||||
echo "Installing driftctl v$version"
|
echo "Installing driftctl v$version"
|
||||||
|
|
||||||
echo "Downloading release tarball from $driftctl_url/v$version/driftctl_$os"
|
echo "Downloading release tarball from $driftctl_url/v$version/driftctl_$os"
|
||||||
$(curlw -# -f -L -o "$dst_path/driftctl_$os" --create-dirs "$driftctl_url/v$version/driftctl_$os") || log_error 'Tarball download failed'
|
$(curlw "$curl" -f -L -o "$dst_path/driftctl_$os" --create-dirs "$driftctl_url/v$version/driftctl_$os") || log_error 'Tarball download failed'
|
||||||
|
|
||||||
echo "Downloading SHA256 hashes file from $driftctl_url/v$version/driftctl_SHA256SUMS"
|
echo "Downloading SHA256 hashes file from $driftctl_url/v$version/driftctl_SHA256SUMS"
|
||||||
$(curlw -s -f -L -o "$dst_path/driftctl_SHA256SUMS" "$driftctl_url/v$version/driftctl_SHA256SUMS") || log_debug 'SHA256 hashes download failed'
|
$(curlw -s -f -L -o "$dst_path/driftctl_SHA256SUMS" "$driftctl_url/v$version/driftctl_SHA256SUMS") || log_debug 'SHA256 hashes download failed'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
|
|
||||||
version="0.1.3"
|
version="0.1.4"
|
||||||
git_revision=""
|
git_revision=""
|
||||||
|
|
||||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q dctlenv; then
|
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q dctlenv; then
|
||||||
|
|
Loading…
Reference in New Issue