mirror of
https://github.com/eza-community/eza
synced 2024-10-04 15:09:49 +00:00
refactor: Directly use one "big" awk command
Replace "cat + grep + head + awk + tr" by one awk command. That's also avoid the "useless cat" case : https://github.com/koalaman/shellcheck/wiki/SC2002 Co-authored-by: gierens <sandro@gierens.de> Co-authored-by: Gardouille <gardouille@gmail.com>
This commit is contained in:
parent
3002c85300
commit
036e57d4f6
2
Justfile
2
Justfile
|
@ -74,7 +74,7 @@ all-release: build-release test-release
|
|||
# build the man pages
|
||||
@man:
|
||||
mkdir -p "${CARGO_TARGET_DIR:-target}/man"
|
||||
version=$(cat Cargo.toml | grep ^version | head -n 1 | awk '{print $NF}' | tr -d '"'); \
|
||||
version=$(awk 'BEGIN { FS = "\"" } ; /^version/ { print $2 ; exit }' Cargo.toml); \
|
||||
for page in eza.1 eza_colors.5 eza_colors-explanation.5; do \
|
||||
pandoc --standalone -f markdown -t man <(cat "man/${page}.md" | sed "s/\$version/v${version}/g") > "${CARGO_TARGET_DIR:-target}/man/${page}"; \
|
||||
done;
|
||||
|
|
Loading…
Reference in a new issue