From: Dan Tenenbaum Date: 2006-09-02T07:20:18+09:00 Subject: Re: Using rake package task- suppressing initial segment of Jim Weirich wrote: > Dan Tenenbaum wrote: > [...] >> I need for the initial "wcv" **not** to be included. >> In other words, when I run "tar ztf pkg/wcv.tar.gz" I want to see: >> README > > Yikes! I hate when packages dump their contained files intermingled > with files in the current directory. That's why PackageTask does it > that way it does. Yeah...but I'm not creating a package. I have a specialized need. > Assume your project is myproj, version 1.2.3 > > Add this task: > > > file "myproj-1.2.3.tgz" => "pkg/myproj-1.2.3" do > chdir("pkg/pkg/myproj-1.2.3") do > sh %{tar zcvf ../../myproj-1.2.3.tgz *} > end > end > > This will create a tgz file in the root of your project (rather than in > the pkg directory like the package task does). Typing: > > rake myproj-1.2.3.tgz > > will do the trick. > > Does this help? Yes, that works, thanks. I ended up just doing it without the Package task, and just using Find.find to generate the list of files, looping through it to weed out my complicated exclusions. -- Posted via http://www.ruby-forum.com/.