http://qs321.pair.com?node_id=285455


in reply to Pure Perl or the toolkit?

Since you're already using make, why not use install as well from within the Makefile? install should be available on most any system that has some form of make avaible. That seems to satisfy the required simplicity as well as being fairly portable. Instead of worrying about whats missing in File::Copy, just add an install call to your make target like so:

FILES=/tmp/one /tmp/two /tmp/three DEST=/tmp/mounted_image install: install -m 0755 $(FILES) $(DEST)

cp
----
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Replies are listed 'Best First'.
Re: Pure Perl or the toolkit?
by Abigail-II (Bishop) on Aug 21, 2003 at 13:44 UTC
    Because it has nothing to do with installing files on a final destination. It happens in the middle of a script that creates an image, creates a file system on the image, mounts it, creates device files, creates and copies other files, creates links, finds and installs kernel modules installs busybox, does a handful of other things, and then umounts the file system and compresses the image. By the time the script is finished, no destination to copy to exists.

    Sure, I could drive the entire thing with make, and lots of things are already done in pure make. But then I would have to start parsing configuration files as well. Not impossible, but sometimes, it's easier to use Perl.

    Abigail