mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-06 14:50:05 +00:00
fix(scripts): fix shared.sh guard logic and echo -e portability
- shared.sh: simplify guard logic, remove misleading warning message,
use ${VAR:-} pattern to avoid unbound variable error
- install-cheat-purebashbible.sh: replace echo -e with printf for
POSIX portability
This commit is contained in:
@@ -86,7 +86,7 @@ process_chapters()
|
||||
if [ '---' != "$(head -1 < "$cheat_file")" ]; then
|
||||
local metadata
|
||||
metadata="$PBB_SYNTAX\n$PBB_TAGS\n$PBB_SOURCE\n"
|
||||
echo -e "---\n$metadata---\n$(cat "$cheat_file")" > "$cheat_file"
|
||||
printf '%s\n%b%s\n%s' "---" "$metadata" "---" "$(cat "$cheat_file")" > "$cheat_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user