]> git.uio.no Git - u/mrichter/AliRoot.git/blob - share/alijob
Changes needed by the following commit: coding convention for type (_t) and access...
[u/mrichter/AliRoot.git] / share / alijob
1 #!/bin/sh
2 #############################################################################
3 # alijob - a shell script to run AliRoot in batch
4 #############################################################################
5 #
6 # modification history
7 #
8 # $Log$
9 #
10 # SYNOPSIS
11 # alijob [-setroot $ALICE_ROOT $ROOTSYS] command...
12 #
13 # DESCRIPTION
14
15 #C<
16 ###########################################################################
17
18 ###########################################################################
19 AliJob()
20 ###########################################################################
21 {
22    printf "alijob [-setroot \$ALICE_ROOT \$ROOTSYS] command...\n"
23    exit
24 }
25
26 ###########################################################################
27
28 for param in $*
29 do
30     case $1 in
31         -trace)
32             shift 1
33             set -vx
34             ;;
35         -help)
36             AliJob
37             ;;
38         -setroot)
39             shift 1
40             ALICE_ROOT=$1
41             ROOTSYS=$2
42             shift 1
43             ;;
44         -echo)
45             shift 1
46             ECHO="echo "
47             ;;
48         *)
49             break
50             ;;
51     esac
52 done
53
54 if [ "$1" = "" ]
55 then
56   AliJob
57 else
58   $ECHO bsub -setroot $ALICE_ROOT $ROOTSYS $*
59 fi
60