2 # Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Various install-sh checks
23 .
/install-sh
&& exit 1
24 .
/install-sh
-m 644 dest
&& exit 1
28 # It should be OK to create no directory. We sometimes need
29 # this when directory are conditionally defined.
34 # Multiple directories (for make installdirs).
35 .
/install-sh
-d d1 d2 d3 d4
41 .
/install-sh
-d p
1/p
2/p3 p
4//p
5//p
6//
47 .
/install-sh
-c -m 644 x y
50 .
/install-sh
-m 644 y z
54 .
/install-sh
-m 644 -c x z d1
59 .
/install-sh
-m 644 x z d
2//
64 .
/install-sh
-t d3
-m 644 x z
69 .
/install-sh
-t d
4// -m 644 x z
74 .
/install-sh
-T x d
3/y
77 .
/install-sh
-T x d3
&& exit 1
78 .
/install-sh
-T x d
4// && exit 1
80 # Do not change the timestamps when using -C.
82 .
/install-sh
-C file d1
83 TZ
=UTC0
touch -t $old_timestamp d
1/file
84 .
/install-sh
-C file d1
85 is_newest
file d
1/file
87 .
/install-sh
-C file d1
89 # Rights must be updated.
90 .
/install-sh
-C -m 444 file d1
94 # Ensure that install-sh works with names that include spaces
97 .
/install-sh
'a b' 'x y'