From 8eafa2fd7cd5630d7ef815419f950102771af642 Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Thu, 19 Feb 2026 21:21:09 -0800 Subject: [PATCH 1/2] Update install.sh --- .github/workflows/release.yaml | 3 ++- .github/workflows/vhs.yaml | 2 +- README.md | 1 + scripts/install.sh | 25 ++++++++++++------------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8a39f60..f74c440 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -156,7 +156,7 @@ jobs: name: "Release" if: ${{ github.event_name == 'release' }} runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 5 needs: [windows] permissions: @@ -206,6 +206,7 @@ jobs: vt: name: "VirusTotal" runs-on: ubuntu-latest + timeout-minutes: 15 continue-on-error: true needs: [release] diff --git a/.github/workflows/vhs.yaml b/.github/workflows/vhs.yaml index 42ff74f..67a7a73 100644 --- a/.github/workflows/vhs.yaml +++ b/.github/workflows/vhs.yaml @@ -24,7 +24,7 @@ jobs: vhs: name: "VHS ${{ matrix.tape }}" runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 15 #continue-on-error: ${{ inputs.continue-on-error }} strategy: fail-fast: false diff --git a/README.md b/README.md index cf194cb..b3c1e23 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![GitHub Downloads](https://img.shields.io/github/downloads/smashedr/install-release/total?logo=rolldown&logoColor=white)](https://github.com/smashedr/install-release/releases/latest) [![Image Size](https://badges.cssnr.com/ghcr/size/smashedr/install-release)](https://github.com/smashedr/install-release/pkgs/container/install-release) [![Go Version](https://img.shields.io/github/go-mod/go-version/smashedr/install-release?logo=go&logoColor=white&label=go)](https://github.com/smashedr/install-release/blob/master/go.mod) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=smashedr_install-release&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=smashedr_install-release) [![Deployment Docs](https://img.shields.io/github/deployments/smashedr/install-release/docs?logo=materialformkdocs&logoColor=white&label=docs)](https://github.com/smashedr/install-release/deployments/docs) [![Deployment Preview](https://img.shields.io/github/deployments/smashedr/install-release/preview?logo=labex&logoColor=white&label=preview)](https://github.com/smashedr/install-release/deployments/preview) [![Workflow Release](https://img.shields.io/github/actions/workflow/status/smashedr/install-release/release.yaml?logo=norton&logoColor=white&label=release)](https://github.com/smashedr/install-release/actions/workflows/release.yaml) diff --git a/scripts/install.sh b/scripts/install.sh index 1881245..02435e4 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -25,6 +25,7 @@ function fail() { # OS +# TODO: Confirm setting EXE to .exe is not required OS=$(uname -s | tr '[:upper:]' '[:lower:]') echo "OS: ${OS}" case "${OS}" in @@ -99,7 +100,7 @@ echo "GET: ${GET}" # BIN echo "Target Directory: $TARGET_BIN" echo -n "Enter Path [press to accept]: " -read -r input +read -r input &1) -#STATUS=$? -#echo "OUT: ${OUT}" -#echo "STATUS: ${STATUS}" -#if [[ "${STATUS}" != "0" ]]; then -# if [[ $OUT =~ "Permission denied" ]]; then -# echo "mv with sudo..." -# sudo mv "${TEMP_BIN}" "${DEST}" || fail "sudo mv failed" -# fi -#fi +MOVE_OUT=$(mv "${TEMP_BIN}" "${DEST}" 2>&1) +MOVE_ST=$? +echo "MOVE_ST: ${MOVE_ST}" +echo "MOVE_OUT: ${MOVE_OUT}" +if [[ "${MOVE_ST}" != "0" ]]; then + if [[ ${MOVE_OUT} =~ "Permission denied" ]]; then + echo "mv with sudo..." + sudo mv "${TEMP_BIN}" "${DEST}" || fail "sudo mv failed" + fi +fi echo "✅ Successfully Installed: ${EXE}" From a91451af4962811cce1077fef4a99e9bbb3123a7 Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Thu, 19 Feb 2026 21:34:34 -0800 Subject: [PATCH 2/2] Update install.sh --- scripts/install.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 02435e4..c25cc57 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -154,15 +154,9 @@ echo "DEST: ${DEST}" # MOVE -MOVE_OUT=$(mv "${TEMP_BIN}" "${DEST}" 2>&1) -MOVE_ST=$? -echo "MOVE_ST: ${MOVE_ST}" -echo "MOVE_OUT: ${MOVE_OUT}" -if [[ "${MOVE_ST}" != "0" ]]; then - if [[ ${MOVE_OUT} =~ "Permission denied" ]]; then - echo "mv with sudo..." - sudo mv "${TEMP_BIN}" "${DEST}" || fail "sudo mv failed" - fi +if ! mv "${TEMP_BIN}" "${DEST}"; then + echo "retrying mv with sudo..." + sudo mv "${TEMP_BIN}" "${DEST}" || fail "sudo mv failed" fi