Skip to content

Commit

Permalink
perf: update plugin from template [autocommit]
Browse files Browse the repository at this point in the history
  • Loading branch information
kamontat committed Sep 17, 2023
1 parent d5ae62f commit 44e70b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
## Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v2.2.3
_commit: v2.2.4
_src_path: gh:kc-workspace/asdf-plugin-template.git
addon_yaml:
archive: false
Expand Down
9 changes: 6 additions & 3 deletions lib/addon/checksum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ kc_asdf_checksum() {
fi

local cs_algorithm="256"
local shasum="sha${cs_algorithm}sum"
command -v "$shasum" >/dev/null ||
local shasum="sha${cs_algorithm}sum" args=()
if ! command -v "$shasum" >/dev/null; then
shasum="shasum"
args+=(--algorithm "$cs_algorithm")
fi
args+=(--check "$cs_txt")

local tmp="$PWD"
cd "$dirpath" &&
kc_asdf_exec "$shasum" --check "$cs_txt" >/dev/null &&
kc_asdf_exec "$shasum" "${args[@]}" >/dev/null &&
cd "$tmp" || return 1
}

0 comments on commit 44e70b5

Please sign in to comment.