Skip to content

Commit

Permalink
hygiene, do not use subshells, use command groups instead
Browse files Browse the repository at this point in the history
  • Loading branch information
hroptatyr committed Aug 22, 2014
1 parent 60f69c2 commit c286446
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/scmver_01.clit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/clitoris ## -*- shell-script -*-

$ (cd "${srcdir}"; git describe --dirty --abbrev=7) | \
$ { cd "${srcdir}"; git describe --dirty --abbrev=7; } | \
sed -e 's/^v//' -e 's/-g/-/' -e 's/-/-git/' -e 'y/-/./' > "scmver_01.version"
$ if test -s "scmver_01.version"; then \
yuck scmver "${srcdir}/"; \
Expand Down
2 changes: 1 addition & 1 deletion test/scmver_02.clit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/clitoris ## -*- shell-script -*-

$ (cd "${srcdir}"; git describe --abbrev=7 || true) > "scmver_02.version"
$ { cd "${srcdir}"; git describe --abbrev=7 || true; } > "scmver_02.version"
$ if test -s "scmver_02.version"; then \
yuck scmver "${srcdir}/scmver_02.tmpl"; \
fi
Expand Down
6 changes: 1 addition & 5 deletions test/scmver_03.clit
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/clitoris ## -*- shell-script -*-

$ if test -d "${srcdir}/.git"; then \
yuck scmver "${srcdir}/" > ".test.ver"; \
else \
touch ".test.ver"; \
fi
$ { yuck scmver "${srcdir}/" || true; } > ".test.ver"
$ if test -s ".test.ver"; then \
yuck scmver -n --reference ".test.ver"; \
fi
Expand Down

0 comments on commit c286446

Please sign in to comment.