mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
tcl: use double square brackets consistently in tcl package hook
This commit is contained in:
parent
927251e781
commit
4b5d85bf44
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue