Discussion:
[INSTALLED 3/3] maint: update .gitignore
Paul Eggert
2017-09-23 18:15:01 UTC
Permalink
* .gitignore: Add pre-inst-env, and sort.
---
.gitignore | 75 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 38 insertions(+), 37 deletions(-)

diff --git a/.gitignore b/.gitignore
index 56bdce2c6..89e71ec97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,68 +1,69 @@
-/announcement
-/maintainer/autoconf-*/
-/maintainer/autoconf-*.tar.gz
+/.autom4te.cache
/ChangeLog
-/aclocal.m4
-/configure
-/Makefile.in
/Makefile
-/.autom4te.cache
+/Makefile.in
+/aclocal.m4
+/announcement
+/bin/aclocal
+/bin/aclocal-1.*
+/bin/automake
+/bin/automake-1.*
/config.cache
/config.log
/config.status
/config.status.lineno
+/configure
/configure.lineno
-/bin/aclocal
-/bin/aclocal-1.*
-/bin/automake
-/bin/automake-1.*
-/runtest
+/contrib/t/*.dir
+/contrib/t/*.log
+/contrib/t/*.trs
/doc/.dirstamp
-/doc/automake*.info
-/doc/automake*.info-[0-9]
-/doc/automake*.html
-/doc/automake*.dvi
-/doc/automake*.pdf
-/doc/automake*.ps
-/doc/automake*.t2d/
-/doc/automake*.t2p/
-/doc/automake*.1
/doc/aclocal*.1
-/doc/stamp-vti
-/doc/version.texi
/doc/amhello-*.tar.gz
/doc/amhello/Makefile.in
/doc/amhello/aclocal.m4
+/doc/amhello/compile
/doc/amhello/config.h.in
/doc/amhello/config.h.in~
/doc/amhello/configure
/doc/amhello/depcomp
-/doc/amhello/compile
/doc/amhello/install-sh
/doc/amhello/missing
+/doc/automake*.1
+/doc/automake*.dvi
+/doc/automake*.html
+/doc/automake*.info
+/doc/automake*.info-[0-9]
+/doc/automake*.pdf
+/doc/automake*.ps
+/doc/automake*.t2d/
+/doc/automake*.t2p/
+/doc/stamp-vti
+/doc/version.texi
/doc/web-manual
/lib/Automake/Config.pm
-/test-suite.log
-/t/ax/test-defs.sh
-/t/ax/shell-no-trail-bslash
-/t/ax/cc-no-c-o
-/t/testsuite-part.am
-/t/*-w.tap
+/maintainer/autoconf-*.tar.gz
+/maintainer/autoconf-*/
+/pre-inst-env
+/runtest
/t/*-w.sh
-/t/depcomp-*.tap
+/t/*-w.tap
/t/*.dir
/t/*.log
/t/*.trs
-/contrib/t/*.dir
-/contrib/t/*.log
-/contrib/t/*.trs
-/t/pm/*.log
-/t/pm/*.trs
+/t/ax/cc-no-c-o
+/t/ax/shell-no-trail-bslash
+/t/ax/test-defs.sh
+/t/depcomp-*.tap
/t/perf/*.log
/t/perf/*.trs
+/t/pm/*.log
+/t/pm/*.trs
+/t/testsuite-part.am
+/test-suite.log
+TAGS
cscope.files
cscope.in.out
cscope.out
cscope.po.out
tags
-TAGS
--
2.13.5
Paul Eggert
2017-09-23 18:15:00 UTC
Permalink
* lib/install-sh: Do not append / to destination
directory if it already ends in /. This supports
a destination directory of // on hosts where / and //
are distinct directories, as POSIX allows.
---
lib/install-sh | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/lib/install-sh b/lib/install-sh
index 0360b79e7..ac159ceda 100755
--- a/lib/install-sh
+++ b/lib/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile

-scriptversion=2016-01-11.22; # UTC
+scriptversion=2017-09-23.17; # UTC

# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
fi
dst=$dst_arg

- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
+ # If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
- dst=$dstdir/`basename "$src"`
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
fi
fi

+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
obsolete_mkdir_used=false

if test $dstdir_status != 0; then
@@ -427,8 +435,8 @@ do
else

# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_

# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
--
2.13.5
Loading...