File: run-and-check.sh

package info (click to toggle)
lilypond 2.19.83-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 76,396 kB
  • sloc: cpp: 79,385; ansic: 75,071; lisp: 59,263; xml: 31,196; python: 22,406; sh: 8,159; yacc: 3,872; perl: 3,507; asm: 1,587; lex: 1,408; makefile: 1,048; tcl: 457; awk: 199; php: 53; csh: 50
file content (14 lines) | stat: -rwxr-xr-x 422 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# The nextline takes the value in parameter one, evaluates it
# (necessary if it contains spaces) and runs it. > redirects
# stdout to the logfile given in parameter 2.  2>&1 redirects
# stderr to stdout (i.e. to the logfile).
eval $1 > $2 2>&1
RetVal=$?  # captures the return value of the command
if [ $RetVal -ne 0 ]; then
	echo
	echo "Please check the logfile" $2 "for errors:"
	cat $2
	echo
fi
exit $RetVal