Skip to content

Commit 69acc8b

Browse files
committed
Use ${brace} syntax in shell script, as requested
1 parent 40037b8 commit 69acc8b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/gitconfig.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ git config diff.c++draft.xfuncname '\\rSec[0-9]+(\[.*\])\{'
44

55
precommit="$(git rev-parse --git-dir)/hooks/pre-commit"
66

7-
test -f "$precommit" && exit
7+
test -f "${precommit}" && exit
88
read -p "Install 'make check' pre-commit hook? [Y/n] " hook
9-
if [ -z "$hook" -o "$hook" = "y" -o "$hook" = "Y" ]; then
10-
cat <<EOF > "$precommit"
9+
if [ -z "${hook}" -o "${hook}" = "y" -o "${hook}" = "Y" ]; then
10+
cat <<EOF > "${precommit}"
1111
#!/bin/sh
1212
cd \$(git rev-parse --show-toplevel)/source
1313
make check
1414
EOF
15-
chmod +x "$precommit"
15+
chmod +x "${precommit}"
1616
fi

0 commit comments

Comments
 (0)