[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 0b4d84b 2/7: Prefer $PWD to $(pwd)
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 0b4d84b 2/7: Prefer $PWD to $(pwd) |
Date: |
Thu, 16 Nov 2017 11:09:55 -0500 (EST) |
branch: master
commit 0b4d84b2841a8c642ef2bbdd25713607c366a9a8
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Prefer $PWD to $(pwd)
Both are POSIX; $PWD is simpler and more efficient.
---
check_git_setup.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/check_git_setup.sh b/check_git_setup.sh
index 723f929..2914bde 100755
--- a/check_git_setup.sh
+++ b/check_git_setup.sh
@@ -44,22 +44,22 @@ printf "core.filemode is '%s'\n" $(git config --get-all
core.filemode)
# Make sure the hooks in the repository's hooks/ directory are used.
case "$(readlink -f .git/hooks)" in
- ("$(pwd)/.git/hooks")
+ ("$PWD/.git/hooks")
printf "moving old hooks directory to hooks-orig/ and creating symlink\n"
mv .git/hooks .git/hooks-orig && ln --symbolic --force --no-dereference
../hooks .git
;;
esac
printf " 'readlink -f .git/hooks':\n"
-printf " expected '%s'\n" "$(pwd)"/hooks
+printf " expected '%s'\n" "$PWD"/hooks
printf " observed '%s'\n" "$(readlink -f .git/hooks)"
case "$(readlink -f .git/hooks)" in
- ("$(pwd)/hooks")
+ ("$PWD/hooks")
printf "git hooks directory is properly symlinked\n"
exit 0
;;
- ("$(pwd)/.git/hooks")
+ ("$PWD/.git/hooks")
printf "attempted hooks/ change failed\n"
exit 1
;;
- [lmi-commits] [lmi] master updated (2a7f972 -> c8de75e), Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 0b4d84b 2/7: Prefer $PWD to $(pwd),
Greg Chicares <=
- [lmi-commits] [lmi] master bf52d55 6/7: Require a valid pre-commit hook to exist, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 68cc423 4/7: Regularize readlink options, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master f92ba83 3/7: Allow backup of old .git/hooks to fail, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 1e1716f 5/7: Assert rather than assume, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master 030f1c5 1/7: Fix incorrect command order, Greg Chicares, 2017/11/16
- [lmi-commits] [lmi] master c8de75e 7/7: Show symlink in a few of its many guises, Greg Chicares, 2017/11/16