X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=misc%2Fshlib;h=7b93d170e821d60494f0a5d00eb35bc8962e83e9;hb=f9994a48d2f74b613a0adb19d3917f724d4d1312;hp=60fd4fc1286edf8c23c4436d09b1d8db22e335d9;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;p=ncurses.git diff --git a/misc/shlib b/misc/shlib index 60fd4fc1..7b93d170 100755 --- a/misc/shlib +++ b/misc/shlib @@ -1,6 +1,7 @@ #!/bin/sh ############################################################################## -# Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. # +# 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 # # copy of this software and associated documentation files (the "Software"), # @@ -29,7 +30,7 @@ # # Author: Thomas E. Dickey 1996 # -# $Id: shlib,v 1.10 2005/06/25 22:41:17 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, @@ -80,7 +81,8 @@ 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 fi @@ -100,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