diff --git a/.github/workflows/deps-update.yml b/.github/workflows/deps-update.yml index 14b91b68..23f95dfb 100644 --- a/.github/workflows/deps-update.yml +++ b/.github/workflows/deps-update.yml @@ -29,8 +29,8 @@ jobs: id: find-replace uses: jacobtomlinson/gha-find-replace@v3 with: - find: "github.com/charmbracelet/gum/releases/download/v[0-9]+.[0-9]+.[0-9]+/gum_[0-9]+.[0-9]+.[0-9]+" - replace: "github.com/charmbracelet/gum/releases/download/v${{ steps.gum.outputs.version }}/gum_${{ steps.gum.outputs.version }}" + find: "gumVir='[0-9]+.[0-9]+.[0-9]+'" + replace: "gumVir='${{ steps.gum.outputs.version }}'" include: "setup" - name: 🎈 Create Pull Request diff --git a/setup b/setup index 040989fc..d45f147d 100755 --- a/setup +++ b/setup @@ -24,12 +24,14 @@ declare goThrough=false # Actions getGum() { - declare -r gumUrl="https://github.com/charmbracelet/gum/releases/download/v0.14.0/gum_0.14.0_$(uname)_$(uname -m).tar.gz" + declare -r gumVir='0.14.0' + declare -r gumDir="gum_${gumVir}_$(uname)_$(uname -m)" + declare -r gumUrl="https://github.com/charmbracelet/gum/releases/download/v$gumVir/$gumDir.tar.gz" declare -r gumThemeUrl="https://raw.githubusercontent.com/5ouma/dotfiles/$GIT_REF/data/blue.json" if (! type gum &>/dev/null); then printf ' 🚚💨 Now delivering...' - curl -sL "$gumUrl" | tar zxC "$TMPDIR" 'gum' && alias gumCom='$TMPDIR/gum' + curl -sL "$gumUrl" | tar --strip-components=1 -xC "$TMPDIR" "$gumDir/gum" && alias gumCom="$TMPDIR/gum" printf '\r ' else alias gumCom="$(which gum)" @@ -306,7 +308,7 @@ restoreAppSettings() { } && run 'restoreAppSettings' '## 💾 Restore application settings' true restoreAppShortcuts() { - [[ ! "$(defaults read com.apple.universalaccess com.apple.custommenu.apps)" =~ "NSGlobalDomain" && $? ]] && skip + (defaults read com.apple.universalaccess com.apple.custommenu.apps &>/dev/null) && skip # shellcheck disable=SC2016 gum run 'Running `mksei load`...' -- mksei load "$data/keyboard_shortcuts.json" } && run 'restoreAppShortcuts' '## ⌨️ Restore App Shortcuts' true