Kjetil brinchmann Halvorsen:
> On Fri, Nov 26, 2010 at 12:56, Jochen Schulz <ml@well-adjusted.de> wrote:
>> Kjetil brinchmann Halvorsen:
>>>
>>> This si my shell (bash) script:
>>>
>>> # shell script to install all the packages in ~/R/allpackages,
>>> # to ~/R/allinstall . Should be run from ~/R/Recommend .
By the way: you make your shell-scripting life easier if you use only
absolute paths or at least cd to the desired directory at the beginning.
> Some other problems: I changes my script to:
>
> # shell script to install all the packages in ~/R/allpackages,
> # to ~/R/allinstall . Should be run from ~/R/Recommend .
> #
> for FILE in ~/R/allpackages/geo*z
> do
> if [ -f $FILE ]
> then
> nice -n 19 R CMD INSTALL --library=~/R/allinstall --no-test-load \
> --no-configure --html --no-libs --no-exec $FILE \
> >2 ./errorlog.out >1 ./log.out \
> || echo "Problems encountered during processing of $FILE"
> fi
> done
> #
>
> ( I loop over a smaller subset of files, for debugging purposes)
>
> Another problem:
> I made the log files with
> touch errorlog.out log.out
> chmod ugoa+rw log.out errorlog.out
You don't need to touch the files before redirecting output to them. And
the permissions are unnecessarily wide. You almost never need
world-writeability.
> But still I get the error:
> * DONE (geozoo)
> ./install.all: 13: ./errorlog.out: Permission denied
> Problems encountered during processing of
> /home/kjetil/R/allpackages/geozoo_0.4.2
You are logging to the current directory (./). Are you sure you are in
the directory you expect to be in? Add "pwd" before the CMD to make
sure. And use "set -x" at the beginning of the script (or run it as bash
-x /path/to/script) in order enable bash's debug output.
J.
--
I no longer believe my life will be long, happy, interesting or fulfilled
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
Attachment:
signature.asc
Description: Digital signature