1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove trailing slash(es) from pathnames

This commit is contained in:
Sascha Schumann
2000-05-04 16:08:10 +00:00
parent 72805c7d9b
commit dc91d47014
2 changed files with 6 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ dnl Stores the location of libgcc in libgcc_libpath
dnl
AC_DEFUN(PHP_LIBGCC_LIBPATH,[
changequote({,})
libgcc_libpath="`$1 --print-libgcc-file-name|sed 's%[^/][^/]*$%%'`"
libgcc_libpath="`$1 --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`"
changequote([,])
])
@@ -339,7 +339,9 @@ AC_DEFUN(AC_EXPAND_PATH,[
if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
$2="$1"
else
ep_dir="`dirname \"$1\"`"
changequote({,})
ep_dir="`echo $1|sed 's%/*[^/][^/]*$%%'`"
changequote([,])
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
$2="$ep_realdir/`basename \"$1\"`"
fi

View File

@@ -23,7 +23,7 @@
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id: fastgen.sh,v 1.3 2000-04-30 03:10:34 sas Exp $
# $Id: fastgen.sh,v 1.4 2000-05-04 16:08:10 sas Exp $
#
srcdir=$1
@@ -44,7 +44,7 @@ fi
for makefile in $@; do
echo "creating $makefile"
# portable dirname
dir=`echo $makefile|sed 's%[^/][^/]*$%%'`
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
test -d "$dir/" || $mkdir_p "$dir/"
(cat <<EOF