[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'install --target-directory' is documented but not implemented
From: |
Dmitry V. Levin |
Subject: |
Re: 'install --target-directory' is documented but not implemented |
Date: |
Wed, 11 Aug 2004 01:21:18 +0400 |
Hi,
On Sat, Jun 26, 2004 at 12:06:19AM -0700, Paul Eggert wrote:
> The --target-directory option is documented for 'install', but it's
> not implemented. Here's a patch to implement it. It steals most of
> the code from the changes I've already proposed for cp/ln/mv.
[...]
> @@ -281,15 +329,25 @@ main (int argc, char **argv)
> n_files = argc - optind;
> file = argv + optind;
>
> - if (argc <= optind || (n_files == 1 && !dir_arg))
> + if (n_files <= !target_directory)
> {
> - if (argc <= optind)
> - error (0, 0, _("missing operand"));
> + if (n_files <= 0)
> + error (0, 0, _("missing file operand"));
> else
> - error (0, 0, _("missing operand after %s"), quote (argv[argc - 1]));
> + error (0, 0, _("missing destination file operand after %s"),
> + quote (file[0]));
> usage (EXIT_FAILURE);
> }
>
This change also introduces regression:
$ install -d newdir
install: missing destination file operand after `newdir'
Proposed fix is attached.
Looks like our regression test suit for install program is incomplete.
--
ldv
coreutils-5.3.0-alt-install-dir_arg.patch
Description: Text document
pgpejCUZhEt5s.pgp
Description: PGP signature
- Re: 'install --target-directory' is documented but not implemented,
Dmitry V. Levin <=