From: Jim Meyering Date: Sun, 10 Nov 2002 14:24:01 +0000 (+0000) Subject: Make install-sh work even when names contain spaces or X-Git-Tag: v1.10.2~1105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2afb4254d1dedbbc048dfbe6b037b52b84dab92b;p=platform%2Fupstream%2Fautomake.git Make install-sh work even when names contain spaces or certain (but not all) shell metachars. * lib/install-sh: Remove lots of unnecessary quoting. Add double quotes where necessary. Write diagnostics to stderr, not stdout. Normalize spacing in diagnostics: use one space (not two, and not a TAB) after the leading `install:'. Remove trailing white space. Remove unnecessary curly braces. If removing the destination fails, also try to move it aside. Use `trap' more portably. * tests/installsh2.test: New file, to test for the above fix. * tests/Makefile.am (TESTS): Add installsh2.test. --- diff --git a/ChangeLog b/ChangeLog index 5ef9e91..87f54cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2002-11-09 Jim Meyering + Make install-sh work even when names contain spaces or + certain (but not all) shell metachars. + + * lib/install-sh: Remove lots of unnecessary quoting. + Add double quotes where necessary. + Write diagnostics to stderr, not stdout. + Normalize spacing in diagnostics: use one space (not two, + and not a TAB) after the leading `install:'. + Remove trailing white space. + Remove unnecessary curly braces. + If removing the destination fails, also try to move it aside. + Use `trap' more portably. + * tests/installsh2.test: New file, to test for the above fix. + * tests/Makefile.am (TESTS): Add installsh2.test. + * automake.texi: Fix some typos and a grammar nit. 2002-11-07 Alexandre Duret-Lutz diff --git a/tests/installsh2.test b/tests/installsh2.test new file mode 100755 index 0000000..d2eebf9 --- /dev/null +++ b/tests/installsh2.test @@ -0,0 +1,28 @@ +#! /bin/sh +# Copyright (C) 2002 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with autoconf; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Ensure that install-sh works with names that include spaces + +. ./defs || exit 1 + +touch 'a b' +mkdir 'x y' || exit 1 +/bin/sh install-sh 'a b' 'x y' || exit 1 +test -f x\ y/a\ b