about summary refs log tree commit diff
path: root/pkgs/development/interpreters/tcl
diff options
context:
space:
mode:
authorAndrew Brooks <andrew.brooks@flightaware.com>2021-05-11 11:17:44 -0500
committerAndrew Brooks <andrew.brooks@flightaware.com>2021-05-21 15:18:30 -0500
commit4b5d85bf4433d41598b2e5d6c59c131f4ad0d049 (patch)
tree5d6ee35d374fc2c908549099fa806ed0203a8620 /pkgs/development/interpreters/tcl
parent927251e7814d9c530dc0ed89a2a887a692bc8187 (diff)
tcl: use double square brackets consistently in tcl package hook
Diffstat (limited to 'pkgs/development/interpreters/tcl')
-rw-r--r--pkgs/development/interpreters/tcl/tcl-package-hook.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/interpreters/tcl/tcl-package-hook.sh b/pkgs/development/interpreters/tcl/tcl-package-hook.sh
index f729096a36e6f..747783cb1c27d 100644
--- a/pkgs/development/interpreters/tcl/tcl-package-hook.sh
+++ b/pkgs/development/interpreters/tcl/tcl-package-hook.sh
@@ -5,11 +5,11 @@
 # Add a directory to TCLLIBPATH, provided that it exists
 _addToTclLibPath() {
     local tclPkg="$1"
-    if [ -z "$tclPkg" ]; then
+    if [[ -z "$tclPkg" ]]; then
         return
     fi
 
-    if [ ! -d "$tclPkg" ]; then
+    if [[ ! -d "$tclPkg" ]]; then
         >&2 echo "can't add $tclPkg to TCLLIBPATH; that directory doesn't exist"
         exit 1
     fi
@@ -18,7 +18,7 @@ _addToTclLibPath() {
         tclPkg="{$tclPkg}"
     fi
 
-    if [ -z "${TCLLIBPATH-}" ]; then
+    if [[ -z "${TCLLIBPATH-}" ]]; then
         export TCLLIBPATH="$tclPkg"
     else
         if [[ "$TCLLIBPATH" != *"$tclPkg "* && "$TCLLIBPATH" != *"$tclPkg" ]]; then
@@ -30,7 +30,7 @@ _addToTclLibPath() {
 # Locate any directory containing an installed pkgIndex file
 findInstalledTclPkgs() {
     local -r newLibDir="${!outputLib}/lib"
-    if [ ! -d "$newLibDir" ]; then
+    if [[ ! -d "$newLibDir" ]]; then
         >&2 echo "Assuming no loadable tcl packages installed ($newLibDir does not exist)"
         return
     fi
@@ -39,13 +39,13 @@ findInstalledTclPkgs() {
 
 # Wrap any freshly-installed binaries and set up their TCLLIBPATH
 wrapTclBins() {
-    if [ -z "${TCLLIBPATH-}" ]; then
+    if [[ -z "${TCLLIBPATH-}" ]]; then
         echo "skipping automatic Tcl binary wrapping (nothing to do)"
         return
     fi
 
     local -r tclBinsDir="${!outputBin}/bin"
-    if [ ! -d "$tclBinsDir" ]; then
+    if [[ ! -d "$tclBinsDir" ]]; then
         echo "No outputBin found, not using any TCLLIBPATH wrapper"
         return
     fi