Linux “install” command for wildcard installation

Is there a way to use "install" for installing multiple files at once using a "wildcard" pattern (and still have "install" create the leading directory hierarchy)?

I've tried several different ways:

  • install -D -t /dest/path /source/path/*.py
  • install -D -t /dest/path/ /source/path/*.py
  • install -D /source/path/*.py /dest/path
  • install -D /source/path/*.py /dest/path/

Please help... for each trial it takes a lot of time (I am using pbuilder to test my package each time).

Answers


Maybe use a simple outer for loop around the install call? So how about

for f in /source/path/*.py; do \
    install -D -t /dest/path $$f; \
done

That said, you can always take the logic out of your Makefile, debian/rules file, ... and test it standalone without having to run pbuilder.

Otherwise of course props for using pbuilder for internal projects!


Use the following to create the directory hierarchy, before installing:

install -d /dest/path

and then use:

install -D /source/path/*.py /dest/path

to "install" all the files.


Need Your Help

PostgreSQL different versions

linux postgresql postgresql-9.2

I'm new with PostgreSQL and want to start working with it as the database for a web development.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.