From 5d43fafff901025142354c35d172809a60e9fa92 Mon Sep 17 00:00:00 2001 From: "Vadim (vadcx)" Date: Tue, 7 Nov 2023 19:43:59 +0100 Subject: [PATCH] Use new shell command substitution syntax The old `command` syntax is considered obsolete. We can take this opportunity to teach proper syntax going forward, also putting command output in double-quotes eliminating unintended separation into multiple arguments for space characters. Rationale: https://unix.stackexchange.com/a/126928 --- book/05-distributed-git/sections/maintaining.asc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/05-distributed-git/sections/maintaining.asc b/book/05-distributed-git/sections/maintaining.asc index c377bb68d..2f9ea8f56 100644 --- a/book/05-distributed-git/sections/maintaining.asc +++ b/book/05-distributed-git/sections/maintaining.asc @@ -512,7 +512,7 @@ The command to do this is `git archive`: [source,console] ---- -$ git archive master --prefix='project/' | gzip > `git describe master`.tar.gz +$ git archive master --prefix='project/' | gzip > "$(git describe master).tar.gz" $ ls *.tar.gz v1.6.2-rc1-20-g8c5b85c.tar.gz ---- @@ -522,7 +522,7 @@ You can also create a zip archive in much the same way, but by passing the `--fo [source,console] ---- -$ git archive master --prefix='project/' --format=zip > `git describe master`.zip +$ git archive master --prefix='project/' --format=zip > "$(git describe master).zip" ---- You now have a nice tarball and a zip archive of your project release that you can upload to your website or email to people.