-
Notifications
You must be signed in to change notification settings - Fork 0
/
qgis.sh
executable file
·53 lines (51 loc) · 1.25 KB
/
qgis.sh
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
#!/bin/bash
while [ -n "$1" ]
do
case "$1" in
-e) param="$2"
echo "Found the -e option, with parameter value $param"
release=release-3_$param
oversion='/opt/oracle/instantclient_21_4'
gpath='/usr/local/$grass'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/dev/cpp/build-QGIS$release/output/lib:$oversion
cd ${HOME}/dev/cpp/build-QGIS$release/output/bin/
./qgis ;;
-g) param="$2"
echo "Grass Version is set to $param"
grass=grass$param ;;
-b) param="$2"
echo "Found the -b option, with parameter value $param"
release=release-3_$param
oversion='/opt/oracle/instantclient_21_4'
gpath="/usr/local/$grass"
cd ~/dev/cpp/QGIS
git fetch upstream
git stash
git checkout -f $release
git pull upstream $release
[[ -d ~/dev/cpp/build-QGIS$release ]] || mkdir ~/dev/cpp/build-QGIS$release
cd ~/dev/cpp/build-QGIS$release
cmake ../QGIS/\
-DWITH_ORACLE=ON \
-DWITH_3D=ON \
-DWITH_PDAL=ON \
-DWITH_EPT=ON \
-DGRASS_PREFIX7=$gpath \
-DGRASS_PREFIX8=$gpath \
-DOCI_LIBRARY=$oversion/libclntsh.so \
-DOCI_INCLUDE_DIR=$oversion/sdk/include \
-G Ninja
ninja -j`nproc` -l$((`nproc`-1))
shift ;;
--) shift
break ;;
*) echo "$1 is not an option";;
esac
shift
done
count=1
for param in "$@"
do
echo "Parameter #$count: $param"
count=$(( $count + 1 ))
done