Commit c8016b99cfca6c2c0e5dfe797919b517066c9339
Merge upstream.
Showing 1 changed file Side-by-side Diff
antigen.zsh
... | ... | @@ -15,6 +15,9 @@ local _ANTIGEN_INSTALL_DIR="$(cd "$(dirname "$0")" && pwd)" |
15 | 15 | typeset -a __deferred_compdefs |
16 | 16 | compdef () { __deferred_compdefs=($__deferred_compdefs "$*") } |
17 | 17 | |
18 | +# bsd/osx md5 v.s. linux md5sum | |
19 | +chksum() { (md5sum; test $? = 127 && md5) 2>/dev/null | cut -d' ' -f1 } | |
20 | + | |
18 | 21 | # Syntaxes |
19 | 22 | # antigen-bundle <url> [<loc>=/] |
20 | 23 | # Keyword only arguments: |
... | ... | @@ -494,7 +497,7 @@ antigen-snapshot () { |
494 | 497 | echo -n " created_on='$(date)';" |
495 | 498 | |
496 | 499 | # Add a checksum with the md5 checksum of all the snapshot lines. |
497 | - local checksum="$(echo "$snapshot_content" | md5sum)" | |
500 | + local checksum="$(echo "$snapshot_content" | chksum)" | |
498 | 501 | echo -n " checksum='${checksum%% *}';" |
499 | 502 | |
500 | 503 | # A newline after the metadata and then the snapshot lines. |