Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I often install applications in Linux which don't come in package form but rather one just downloads a tarball, unpacks it, and runs the app out of the exploded folder. To adjust the application to my environment I need to modify the default configuration files, perhaps add an odd script of my own and I would like to have a way to record all these modifications automatically so I can apply them to another environment. Clearly, the modifications can not be reproduced verbatim as things like IP addresses or username need to change from system to system; still an exhaustive record to what was changed and added would be useful.

My solution is to use a pattern involving git. Basically after I explode the tarball I do a git init and an initial commit and then I can save to a file the output of git diff and a cat of all files appearing as new in the git status -s.

But I am sure there are more efficient ways. ???

share|improve this question

1 Answer 1

A combination of git (or patch, if you don't want to depend on git) and a bash script where you replace the IP / usernames using some sed commands should work. Use man followed by the command name to learn about each. In essence, you'll want to store the changes into a git repo (or a patch file to be used with patch) and then on the new installation just fetch the changes and run the script to replace the necessary information. Please note that git can also produce patch files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.