Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/printtime.sh @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 #!/bin/bash | |
2 | |
3 usage(){ | |
4 echo " | |
5 Written by Brian Bushnell | |
6 Last modified January 21, 2015 | |
7 | |
8 Description: Prints time elapsed since last called on the same file. | |
9 | |
10 Usage: printtime.sh <filename> | |
11 | |
12 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems. | |
13 " | |
14 } | |
15 | |
16 #This block allows symlinked shellscripts to correctly set classpath. | |
17 pushd . > /dev/null | |
18 DIR="${BASH_SOURCE[0]}" | |
19 while [ -h "$DIR" ]; do | |
20 cd "$(dirname "$DIR")" | |
21 DIR="$(readlink "$(basename "$DIR")")" | |
22 done | |
23 cd "$(dirname "$DIR")" | |
24 DIR="$(pwd)/" | |
25 popd > /dev/null | |
26 | |
27 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" | |
28 CP="$DIR""current/" | |
29 set=0 | |
30 | |
31 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then | |
32 usage | |
33 exit | |
34 fi | |
35 | |
36 calcXmx () { | |
37 source "$DIR""/calcmem.sh" | |
38 setEnvironment | |
39 parseXmx "$@" | |
40 } | |
41 calcXmx "$@" | |
42 | |
43 function printtime() { | |
44 local CMD="java $EA $EOOM -Xmx8m -cp $CP align2.PrintTime $@" | |
45 echo $CMD >&2 | |
46 eval $CMD | |
47 } | |
48 | |
49 printtime "$@" |