Skip to content

Commit

Permalink
fix: gh-r pattern for 64bit linux-gnu systems
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
  • Loading branch information
vladdoster committed Jan 14, 2023
1 parent 52e112c commit b5a31c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,12 @@ jobs:
fetch-depth: 0

- name: install homebrew
id: set-up-homebrew
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: "install musl"
if: runner.os == 'Linux'
run: |
sudo apt-get update \
&& sudo apt-get install \
build-essential curl file gcc gcc-multilib glibc-source \
libc6 libc6-dev \
musl musl-dev musl-tools unzip zsh
# - name: "install musl"
# if: runner.os == 'Linux'
# run: sudo apt-get install build-essential curl file gcc gcc-multilib glibc-source libc6 libc6-dev unzip xz-utils zsh

- name: "install dependencies"
id: install-deps
Expand Down
2 changes: 1 addition & 1 deletion doc/zsdoc/zinit-install.zsh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ ____
package. Connects to Github releases page.
____
Has 48 line(s). Calls functions:
Has 52 line(s). Calls functions:
.zinit-get-latest-gh-r-url-part
`-- zinit.zsh/+zinit-message
Expand Down
14 changes: 9 additions & 5 deletions zinit-install.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
.zi::get-architecture () {
emulate -LR zsh
setopt extendedglob noshortloops nowarncreateglobal rcquotes typesetsilent
local _arch="$(arch)" _clib="gnu" _cpu="$(uname -m)" _os="$(uname -s)" _sys=""
local _clib="gnu" _cpu="$(uname -m)" _os="$(uname -s)" _sys=""
case "$_os" in
(Darwin)
_sys='(apple|darwin|apple-darwin|dmg|mac((-|)os|)|os(-|64|)x)'
Expand All @@ -1495,9 +1495,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
;;
(Linux)
if [[ -n /lib/*musl*(#qN) ]] || (( ${+commands[musl-gcc]} )); then
_sys='((unknown-|)linux-(gnu|musl))'
_sys='(linux[\-\_])*~^*((gnu|musl)[\-\_\.])'
else
_sys="(unknown-|)linux-gnu"
_sys='(linux[\-\_])*~^*(gnu[\-\_\.])'
fi
;;
(MINGW* | MSYS* | CYGWIN* | Windows_NT)
Expand Down Expand Up @@ -1567,8 +1567,12 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
filtered=( ${list[@]:#(#i)*${~junk}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )

for part in "${parts[@]}"; do
if (( $#list > 1 )) { filtered=( ${(M)list[@]:#(#i)*${~part}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ) }
# +zinit-message "{info}[{pre}gh-r{info}]{rst} filter -> {glob}${part}{rst}{nl} - ${(@pj:\n - :)list[1,2]}{nl}"
if (( $#list > 1 )); then
filtered=( ${(M)list[@]:#(#i)*${~part}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
# +zinit-message "{info}[{pre}gh-r{info}]{rst} filter -> {glob}${part}{rst}{nl} - ${(@pj:\n - :)list[1,2]}{nl}"
else
break
fi
done

if (( $#list > 1 )) { filtered=( ${list[@]:#(#i)*.(sha[[:digit:]]#|asc)} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ); }
Expand Down

0 comments on commit b5a31c0

Please sign in to comment.