lmi-commits
[Top][All Lists]
Advanced

[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
     ;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]