updated to modern VTK
[engrid-github.git] / setup_generic.bash
blob52491ae1f5a25b762a7f867d9edc4ef7a9619254
1 #!/usr/bin/env bash
2 #
3 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 # + +
5 # + This file is part of enGrid. +
6 # + +
7 # + Copyright 2008-2013 enGits GmbH +
8 # + +
9 # + enGrid is free software: you can redistribute it and/or modify +
10 # + it under the terms of the GNU General Public License as published by +
11 # + the Free Software Foundation, either version 3 of the License, or +
12 # + (at your option) any later version. +
13 # + +
14 # + enGrid is distributed in the hope that it will be useful, +
15 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
16 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
17 # + GNU General Public License for more details. +
18 # + +
19 # + You should have received a copy of the GNU General Public License +
20 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
21 # + +
22 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24 echo "This script makes use of the command 'sudo' to install"
25 echo "a script in the directory '/usr/bin' as well as a desktop"
26 echo "file in the directory '/usr/share/applications'."
27 echo ""
28 if [ `sudo whoami` != 'root' ]
29 then
30 echo "You seem to not be able to execute commands as root (via sudo)."
31 echo "Please make sure you have sufficient permissions; alternatively"
32 echo "you can directly execute this script as root."
33 else
34 olddir=`pwd`
35 cd `dirname $0`
36 cp engrid iengrid
37 echo "`pwd`/run.bash" >> iengrid
38 sudo cp iengrid /usr/bin/engrid
39 sudo chmod a+x /usr/bin/engrid
40 cp engrid.desktop iengrid.desktop
41 echo "Icon=`pwd`/src/libengrid/resources/icons/G.png" >> iengrid.desktop
42 sudo cp iengrid.desktop /usr/share/applications/engrid.desktop
43 cd $olddir
44 echo "You can start enGrid by typing 'engrid' from the command line (as non-root user)"
45 echo "or with the help of the desktop menus."