Update README.md
[engrid-github.git] / src / scripts / adapt_nglib_for_windows.sh
blobfbde1f0e079dd1381aa1d10f46fda58954dbec86
1 #!/usr/bin/env bash
2 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 # + +
4 # + This file is part of enGrid. +
5 # + +
6 # + Copyright 2008-2014 enGits GmbH +
7 # + +
8 # + enGrid is free software: you can redistribute it and/or modify +
9 # + it under the terms of the GNU General Public License as published by +
10 # + the Free Software Foundation, either version 3 of the License, or +
11 # + (at your option) any later version. +
12 # + +
13 # + enGrid is distributed in the hope that it will be useful, +
14 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 # + GNU General Public License for more details. +
17 # + +
18 # + You should have received a copy of the GNU General Public License +
19 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 # + +
21 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24 echo ${0%/*} #directory of script
25 echo ${0%/*/*} # parent directory of script
26 # exit 0
27 cd ${0%/*/*} || exit 1 # run from parent directory of script
29 package=netgen-mesher
31 echo "Working directory = $(pwd)"
32 cd netgen_svn || exit 1
34 if [ -d netgen-mesher/.svn ]
35 then
36 echo "updating NETGEN from SVN repository (sourceforge.net) -- please wait"
37 svn up $package
38 else
39 echo "downloading NETGEN from SVN repository (sourceforge.net) -- please wait"
40 svn co https://netgen-mesher.svn.sourceforge.net/svnroot/$package $package
43 echo
44 echo "adapting nglib.h for static library on windows"
45 echo
47 sed -i 's/__declspec(dllexport)//' ./netgen-mesher/netgen/nglib/nglib.h
48 sed -i 's/__declspec(dllimport)//' ./netgen-mesher/netgen/nglib/nglib.h
51 # ----------------------------------------------------------------- end-of-file