0
I'm building an RPM spec file and need to list in the %files
section the files to include, relative to a build root that I'll specify. I already have the assembled directory that needs to be packaged--I just need to turn this into a list of relative paths to all files contained therein.
To do this I'm currently using find
, but it's returning absolute paths.
find $1/codebase -type f ! -name ".*" >> ${BUILD_RPM_DST_DIR}/rpm.spec
I'm a bit of a unix n00b so I apologize.
Should I pipe it to sed or grep and remove the initial portion of the path? A sample of how to do that would be helpful.