Skip to content
Prev 48746 / 63424 Next

More than one package document with the same name

On Tue, Aug 5, 2014 at 5:47 PM, Davison, Jerry <jdavison at fhcrc.org> wrote:
Sounds like you want to put all the pdf files in a single directory. I
like that too. I cheat. I run Linux. I have a ~/Documents/R-pdfs in
which I keep "symlinks" to all the pdf files. And I do it similar to
the way that you indicate. I make the name of the pdf be
${enclosing_directory}_${original_pdf_name.pdf}. I do something like:

cd ~/Documents/R-pdf
find /usr/lib64/R -name '*.pdf'|\
while read i;do
  file=${i##*/};
  dir=${i%%/doc/*.pdf};
  package=${dir##*/};
  ln -s "$i" "${package}_${file}";
done

Above won't work if anything has a blank in it. Windows people tend to
do this. Most UNIX people are better trained.

It would be nice if the packagers did this. But the above works for
me. On Linux and other UNIX like systems. Won't work for the poor,
benighted Windows people. But I think something similar is possible.
But I don't know Windows well enough.

Maranatha! <><
John McKown