Debian Codegraph @

icecreamgrader.sh

raw symbols SCIP
1 #!/bin/bash
2
3 usage(){
4 echo "
5 Written by Brian Bushnell
6 Last modified January 21, 2020
7
8 Description: Counts the rate of triangle reads in a file
9 generated by IceCreamMaker with custom headers.
10
11 Usage: icecreamgrader.sh in=<input file>
12
13 Standard parameters:
14 in=<file> Reads to grade.
15
16 Please contact Brian Bushnell at [email protected] if you encounter any problems.
17 "
18 }
19
20 #This block allows symlinked shellscripts to correctly set classpath.
21 pushd . > /dev/null
22 DIR="${BASH_SOURCE[0]}"
23 while [ -h "$DIR" ]; do
24 cd "$(dirname "$DIR")"
25 DIR="$(readlink "$(basename "$DIR")")"
26 done
27 cd "$(dirname "$DIR")"
28 DIR="$(pwd)/"
29 popd > /dev/null
30
31 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
32 CP="$DIR""current/"
33
34 z="-Xmx200m"
35 z2="-Xms200m"
36 set=0
37
38 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
39 usage
40 exit
41 fi
42
43 calcXmx () {
44 source "$DIR""/calcmem.sh"
45 setEnvironment
46 parseXmx "$@"
47 }
48 calcXmx "$@"
49
50 icecreamgrader() {
51 local CMD="java $EA $EOOM $z -cp $CP icecream.IceCreamGrader $@"
52 echo $CMD >&2
53 eval $CMD
54 }
55
56 icecreamgrader "$@"