-
Notifications
You must be signed in to change notification settings - Fork 0
/
clion
executable file
·63 lines (45 loc) · 1.33 KB
/
clion
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
if [ -z "$DISPLAY" ]; then
# for cloudcat machines
export DISPLAY=:3
fi
# run newest clion
CLION=`ls -td ~/bin/clion-* | head -1`
if [ -z "$CLION" ];
then
echo no clion in bin
exit 1
fi
if [ "$#" -ge 5 ]
then
# prevent 'cl *' which really sucks
echo "$0: too many arguments, are you sure?"
exit 1;
fi
echo running $CLION
# on gce I also had
# . $IMPALA_HOME/bin/set-classpath.sh
cd $IMPALA_HOME
set -euo pipefail
if [ -f $IMPALA_HOME/bin/report_build_error.sh ]
then
. $IMPALA_HOME/bin/report_build_error.sh
setup_report_build_error
else
echo "no report_build_error (expected on branches older than 2018)"
fi
# unset LD_LIBRARY_PATH
. $IMPALA_HOME/bin/set-pythonpath.sh
echo PYTHONPATH=$PYTHONPATH
echo "you may need to set that in clion as a local env var"
LLL="$(python "$IMPALA_HOME/infra/python/bootstrap_virtualenv.py" --print-ld-library-path)"
# LD_LIBRARY_PATH+="$(echo $LLL | sed 's?debug/lib64?debug/lib?')"
# LD_LIBRARY_PATH+="$IMPALA_HOME/infra/python/env/lib/python2.7/site-packages/kudu"
export LD_LIBRARY_PATH=$LLL:$IMPALA_KUDU_HOME/debug/lib
# export LD_LIBRARY_PATH
# echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
# echo NOT setting LD_LIBRARY_PATH
PY_DIR="$IMPALA_HOME/infra/python"
python "$PY_DIR/bootstrap_virtualenv.py"
# allow clion diff file1 file2
$CLION/bin/clion.sh $*