summaryrefslogtreecommitdiff
path: root/misc/shlib
diff options
context:
space:
mode:
Diffstat (limited to 'misc/shlib')
-rwxr-xr-xmisc/shlib8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/shlib b/misc/shlib
index 8772d4f..7b93d17 100755
--- a/misc/shlib
+++ b/misc/shlib
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2021 Thomas E. Dickey #
# Copyright 1998-2005,2007 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@@ -30,7 +30,7 @@
#
# Author: Thomas E. Dickey <dickey@clark.net> 1996
#
-# $Id: shlib,v 1.13 2020/02/02 23:34:34 tom Exp $
+# $Id: shlib,v 1.14 2021/09/04 15:55:29 tom Exp $
# Use this script as a wrapper when running executables linked to shared
# libraries on systems that use the $LD_LIBRARY_PATH variable and don't embed
# the soname's path within the linked executable (such as IRIX), e.g,
@@ -81,7 +81,7 @@ q=""
for p in lib ../lib ../../lib ../../../lib
do
if test -d $p; then
- q=`cd $p; pwd`
+ q=`cd $p || exit; pwd`
break
elif test -f configure && test ! -d ../$p ; then
break
@@ -102,7 +102,7 @@ if test -n "$q" ; then
elif test -n "$LD_LIBRARY_PATH"; then
system=unix
else
- for r in $q/*.*
+ for r in "$q"/*.*
do
if test -f "$r"
then