-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathom.sh
More file actions
executable file
·46 lines (34 loc) · 1.04 KB
/
om.sh
File metadata and controls
executable file
·46 lines (34 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash -l
opticks-
om- # environment setup (oe-) and build functions om-cmake etc..
sdir=$(pwd)
name=$(basename $sdir)
exe=$OPTICKS_PREFIX/bin/$name
rm $exe
if [ ! -f "$exe" ]; then
bdir=/tmp/$USER/opticks/$name/build
rm -rf $bdir
mkdir -p $bdir && cd $bdir && pwd
type om-cmake
om-cmake $sdir
make install
else
echo exe $exe exists already : delete it to rebuild
fi
cd $sdir
o-lldb-identify(){
: macOS has some security that prevents /usr/bin/lldb from seeing DYLD_LIBRARY_PATH envvar
: however direct use of the lldb binary from within the Xcode bundle does not suffer from this restriction
local lldb_bin=/Applications/Xcode/Xcode_10_1.app/Contents/Developer/usr/bin/lldb
[ ! -f "$lldb_bin" ] && echo $FUNCNAME : WARNING lldb_bin $lldb_bin DOES NOT EXIST && return 1
export LLDB=$lldb_bin
return 0
}
o-lldb-identify
args="gdml/G4Opticks.gdml muon.mac"
case $(uname) in
Darwin) runline="$LLDB $exe $args" ;;
Linux) runline="gdb --args $exe $args" ;;
esac
echo $runline
eval $runline