debug: install script on win

pull/1411/head
iwilltry42 2 weeks ago
parent 8e699fe874
commit 1e952bfcfe
No known key found for this signature in database
GPG Key ID: FD4E78FBAD6B1550
  1. 2
      .github/workflows/test-install-osmatrix.yaml
  2. 14
      install.sh

@ -20,6 +20,8 @@ jobs:
- uses: actions/checkout@v3
- name: Run install.sh on ${{ matrix.os }}
shell: bash
env:
DEBUG: "true"
# just run install.sh b/c github can throttle itself based on egress limits and gets 503 sometimes
run: |
echo "Simulating: curl -s https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_REF_NAME/install.sh | bash"

@ -104,7 +104,12 @@ checkTagProvided() {
checkLatestVersion() {
local latest_release_url="$REPO_URL/releases/latest"
if type "curl" > /dev/null; then
TAG=$(scurl -Ls -o /dev/null -w %{url_effective} $latest_release_url | grep -oE "[^/]+$" )
if [[ "$DEBUG" == "true" ]]; then
echo "Fetching latest release URL: $latest_release_url"
TAG=$(scurl -Lvvv -o /dev/null -w %{url_effective} $latest_release_url | grep -oE "[^/]+$" )
else
TAG=$(scurl -Ls -o /dev/null -w %{url_effective} $latest_release_url | grep -oE "[^/]+$" )
fi
elif type "wget" > /dev/null; then
TAG=$(wget $latest_release_url --server-response -O /dev/null 2>&1 | awk '/^\s*Location: /{DEST=$2} END{ print DEST}' | grep -oE "[^/]+$")
fi
@ -121,7 +126,12 @@ downloadFile() {
K3D_TMP_ROOT="$(mktemp -dt k3d-binary-XXXXXX)"
K3D_TMP_FILE="$K3D_TMP_ROOT/$K3D_DIST"
if type "curl" > /dev/null; then
scurl -sL "$DOWNLOAD_URL" -o "$K3D_TMP_FILE"
if [[ "$DEBUG" == "true" ]]; then
echo "Downloading $DOWNLOAD_URL to $K3D_TMP_FILE"
scurl -L -vvv "$DOWNLOAD_URL" -o "$K3D_TMP_FILE"
else
scurl -sL "$DOWNLOAD_URL" -o "$K3D_TMP_FILE"
fi
elif type "wget" > /dev/null; then
wget -q -O "$K3D_TMP_FILE" "$DOWNLOAD_URL"
fi

Loading…
Cancel
Save