X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=misc%2Fshlib;fp=misc%2Fshlib;h=7b93d170e821d60494f0a5d00eb35bc8962e83e9;hp=8772d4f4a9e076d21beaa6078718fb9eca934a7c;hb=643ec2bf782cd02efafe3ccdeaea8920a404645e;hpb=9b51794524995304d8788e42aacb36feede9364f diff --git a/misc/shlib b/misc/shlib index 8772d4f4..7b93d170 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 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