mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -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 {
|
function {
|
||||||
local a b
|
local a b
|
||||||
|
|
||||||
[ -s ~/.sh.sha1 ] && read -r b < ~/.sh.sha1
|
[ -s ~/.sh.sha1 ] && read -r b _ < ~/.sh.sha1
|
||||||
( cd ~/sh \
|
( cd ~/sh \
|
||||||
&& print -l '#!/usr/bin/env false' '[ "${SOURCING:-0}" -gt 0 ] || exit 1' '' \
|
&& print -l '#!/usr/bin/env false' '[ "${SOURCING:-0}" -gt 0 ] || exit 1' '' \
|
||||||
| cat - $(grep -lF 'YES_ZSH' *(.)) \
|
| cat - $(grep -lF 'YES_ZSH' *(.)) \
|
||||||
| tee ~/.sh \
|
| tee ~/.sh \
|
||||||
) | sha1sum - \
|
) | sha1sum - \
|
||||||
| cut -d' ' -f1 \
|
|
||||||
| tee ~/.sh.sha1 \
|
| tee ~/.sh.sha1 \
|
||||||
| read -r a
|
| read -r a _
|
||||||
|
|
||||||
[ "$a" = "$b" ] && touch ~/.sh.zwc || zrecompile -p ~/.sh
|
[ "$a" = "$b" ] && touch ~/.sh.zwc || zrecompile -p ~/.sh
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue