On 20/06/2012 11:34, Mark Rogers wrote: > On 20/06/12 09:55, Tony Cowderoy wrote: >> If you've got a lot of things that you need to substitute in various >> files, you might want to look at one of the various macro languages or >> templating systems. > > It won't be "a lot", but will probably be "more than one". > > I'm happy to use tools like sed/awk/etc but I don't really want to > install anything else onto the boxes that I don't need except for the > installation. > > I've been playing with Hamachi: > https://secure.logmein.com/labs/ > .. on my Raspberry Pi and the install script has massive dependencies > (build-essentials amongst other things) just for the install script to > run, where all it uses is the "install" function to copy a file and > change its permissions in one go. I've written my own installer that > gets around it and it's made me very determined not to have to install > things that I only need for the installation process. > You should be able to do what you need with what is on the box. The distro's package manager has to do the same kinds of things that you want to do, so there must be suitable tools there already. It might be worth investigating what the existing package manager uses.
Personally, I've never got on with sed or AWK and I tend to use Perl or Ruby for that kind of thing, but "one man's meat is another man's poison". From what I know of AWK, it should be more than capable of doing what you need. The other thing you might want to look at for the scenario you've described is to create packages using your distro's package manager and have the users do local installs to their home directories using the package manager. That way, you know you've got all of the tools you need and you are following a proven process. Tony Cowderoy _______________________________________________ Peterboro mailing list Peterboro@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/peterboro