Opened 10 years ago

Closed 10 years ago

#891 closed defect (fixed)

Storing output from Mac shortcuts

Reported by: ak19 Owned by: nobody
Priority: moderate Milestone:
Component: Collection Building Severity: major
Keywords: Cc:

Description

client-gli.app required debugging. But .app shortcuts run without a console. Long ago, Dr Bainbridge had already found out how to redirect stdout and stderr to a log file from a .app.

START

exec 2>/tmp/gli.output

printenv 1>&2

/Volumes/Research/ak19_2/GS3bin_23Sep2014/gli/client-gli.sh

END

Adding this in to all the .app shortcuts we have, after trying to write to :

START

logdir=/tmp

if test -n $GSDLHOME; then

if test -w $GSDLHOME/logs; then

logdir=$GSDLHOME/logs

fi

fi

exec 2>$logdir/gli.output

&2 echo "GSDLHOME is |$GSDLHOME|"

printenv 1>&2

/Volumes/Research/ak19_2/GS3bin_23Sep2014/gli/client-gli.sh

END

Replacing all references to $GSDLHOME with @gsdl3srchome@ for GS3

This ticket has been added in to document the actual code tested in the automator, since in the .app files it ends up html encoding angle brackets and ampersand signs.

Change History (2)

comment:1 by ak19, 10 years ago

START

logdir=/tmp

if test -w @gsd3srchome@/web/logs; then

logdir=@gsd3srchome@/web/logs

fi

exec 2>$logdir/gli.output

&2 echo "GSDL3SRCHOME is |@gsd3srchome@|"

printenv 1>&2

@gsd3srchome@/gli/client-gli.sh

END

comment:2 by ak19, 10 years ago

Resolution: fixed
Status: newclosed

http://trac.greenstone.org/changeset/29377

http://trac.greenstone.org/changeset/29378

Updated the Mac .app shortcuts (document.wflow.in files) in GS3 and GS2. Commit message was: "Redirecting stderr and stdout to a logfile with the same name as the app file and located in gsdl3srchome/web/logs, if writable, or otherwise in /tmp."

Note: See TracTickets for help on using tickets.