-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathbashrc
More file actions
37 lines (27 loc) · 1023 Bytes
/
bashrc
File metadata and controls
37 lines (27 loc) · 1023 Bytes
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
#!/bin/bash
myCurDIR=$(cd "$(dirname ${BASH_SOURCE[0]})/.." && pwd)
if [ -n "$msBinDir" ]; then
echo "Info: msSrc(=$msSrc) is NOT reset from $myCurDIR"
if [ "$msSrc" != "$myCurDIR" ]; then
echo "Hint, try reseting your (terminal) session and its settings";
fi
elif ! [ -f $myCurDIR/Makefile ]; then
echo "Error: $myCurDIR does not seem to be a source directory."
echo " Makefile does not exists.";
else
export msSrc="$myCurDIR"
export msRoot=$( cd "$msSrc/../" && pwd )
export msBinDir=$msRoot/bin
export msLibDir=$msRoot/lib
export msIncDir=$msRoot/include
export msBilDir=$msRoot/build
export msTstDir=$msRoot/test
# maybe safer to prepend PATHs?
export PATH=$PATH:$msSrc/script
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$msLibDir
export PATH=$PATH:$msBinDir
if ! [ -d $msBinDir ]; then mkdir -p $msBinDir; fi
if ! [ -d $msLibDir ]; then mkdir -p $msLibDir; fi
if ! [ -d $msIncDir ]; then mkdir -p $msIncDir; fi
export PYTHONPATH=$msSrc/script:$msSrc/pylib:$PYTHONPATH
fi