[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master a3e2072 1/3: Improve concinnity

From: Greg Chicares
Subject: [lmi-commits] [lmi] master a3e2072 1/3: Improve concinnity
Date: Sun, 18 Oct 2020 06:24:29 -0400 (EDT)

branch: master
commit a3e2072502f51d218f83072a4b343690ecaa5128
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Improve concinnity
      git grep -h 'dirname.*readlink'
    shows no incongruity.
 check_git_setup.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/check_git_setup.sh b/check_git_setup.sh
index 13c739f..5262e85 100755
--- a/check_git_setup.sh
+++ b/check_git_setup.sh
@@ -24,7 +24,8 @@
 # Navigate to the directory where this script resides, and make sure
 # it's a git "toplevel" directory.
-cd "$(dirname "$(readlink -f "$0")")" || printf 'Cannot cd\n'
+srcdir=$(dirname "$(readlink --canonicalize "$0")")
+cd "$srcdir" || printf 'Cannot cd\n'
 toplevel=$(git rev-parse --show-toplevel)
 printf '"%s" is current directory\n' "$PWD"
 printf '"%s" is git toplevel directory\n' "$toplevel"

reply via email to

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