mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:19:03 -08:00
don't cut sha1 file
This commit is contained in:
parent
6a57d0afdd
commit
db0b029d0f
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue