My advisor frequently compiles a bunch of software into his /usr/local and then distributes his /usr/local as a tarball. I then extract the tarball onto our lab machines for our use. Until now, this has worked fine, we just replace the old /usr/local with the contents of the tarball.
But I have started installing my own software on these machines. If I delete /usr/local, obviously some of that software and config gets deleted as well.
Instead, how can I recursively copy files from the tarball into the corresponding directory in /usr/local?
For example:
tarball path filesystem path
------------ ---------------
local/bin/myprog -> /usr/local/bin/myprog
local/lib/mylib.so -> /usr/local/lib/mylib.so
etc.
Or is this a better question for ServerFault?