1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-20 02:43:23 -07:00

add some much-needed comments about .sh

This commit is contained in:
Connor Olding 2021-09-10 09:26:32 -07:00
parent 747a56a9b0
commit a00a4a057f
2 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,8 @@ alias pl="printf '%s\n'"
ADDPATH "$HOME/sh"
(
# combine everything matching "YES_BASH" in ~/sh/ into ~/.sh-bash.
# unlike zsh, we do not check the sha1sum of the output.
cd ~/sh \
&& printf "%s\n" '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' \
| cat - $(grep -lF 'YES_BASH' $(find ~/sh -maxdepth 1 -type f)) \

View File

@ -49,6 +49,8 @@ zmodload zsh/mathfunc
function {
local a b
# combine everything matching "YES_ZSH" in ~/sh/ into ~/.sh,
# but only recompile the output if the sha1sum has changed.
[ -s ~/.sh.sha1 ] && read -r b _ < ~/.sh.sha1
( cd ~/sh \
&& print -l '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' \