1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-28 18:17:11 -07:00

don't cut sha1 file

This commit is contained in:
Connor Olding 2021-08-01 01:37:59 -07:00
parent 6a57d0afdd
commit db0b029d0f

View File

@ -49,15 +49,14 @@ zmodload zsh/mathfunc
function {
local a b
[ -s ~/.sh.sha1 ] && read -r b < ~/.sh.sha1
[ -s ~/.sh.sha1 ] && read -r b _ < ~/.sh.sha1
( cd ~/sh \
&& print -l '#!/usr/bin/env false' '[ "${SOURCING:-0}" -gt 0 ] || exit 1' '' \
| cat - $(grep -lF 'YES_ZSH' *(.)) \
| tee ~/.sh \
) | sha1sum - \
| cut -d' ' -f1 \
| tee ~/.sh.sha1 \
| read -r a
| read -r a _
[ "$a" = "$b" ] && touch ~/.sh.zwc || zrecompile -p ~/.sh
}