Skip to content

Commit

Permalink
Merge pull request #74 from coreyjewett/master
Browse files Browse the repository at this point in the history
localize and don't leak cross-platform md5 function
  • Loading branch information
sharat87 committed Mar 7, 2014
2 parents 454a2c6 + 3811dd8 commit 66bfd79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions antigen.zsh
Expand Up @@ -15,9 +15,6 @@ local _ANTIGEN_INSTALL_DIR="$(cd "$(dirname "$0")" && pwd)"
typeset -a __deferred_compdefs
compdef () { __deferred_compdefs=($__deferred_compdefs "$*") }

# bsd/osx md5 v.s. linux md5sum
chksum() { (md5sum; test $? = 127 && md5) 2>/dev/null | cut -d' ' -f1 }

# Syntaxes
# antigen-bundle <url> [<loc>=/]
# Keyword only arguments:
Expand Down Expand Up @@ -499,7 +496,9 @@ antigen-snapshot () {
echo -n " created_on='$(date)';"
# Add a checksum with the md5 checksum of all the snapshot lines.
chksum() { (md5sum; test $? = 127 && md5) 2>/dev/null | cut -d' ' -f1 }
local checksum="$(echo "$snapshot_content" | chksum)"
unset -f chksum;
echo -n " checksum='${checksum%% *}';"
# A newline after the metadata and then the snapshot lines.
Expand Down

0 comments on commit 66bfd79

Please sign in to comment.