Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / autorun.sh @ 762

History | View | Annotate | Download (1.79 KB)

1
#!/bin/sh
2
#
3
# gvSIG. Desktop Geographic Information System.
4
#
5
# Copyright (C) 2007-2013 gvSIG Association.
6
#
7
# This program is free software; you can redistribute it and/or
8
# modify it under the terms of the GNU General Public License
9
# as published by the Free Software Foundation; either version 3
10
# of the License, or (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
# MA  02110-1301, USA.
21
#
22
# For any additional information, do not hesitate to contact us
23
# at info AT gvsig.com, or visit our website www.gvsig.com.
24
#
25

    
26

    
27
#
28
# Plugin autorun
29
#
30

    
31
PLUGIN_NAME=$(basename "$PLUGIN_FOLDER")
32

    
33
# https://redmine.gvsig.net/redmine/issues/3975
34
jythonjar=$(echo "$PLUGIN_FOLDER/lib/"*jython*.jar)
35
add_property python.home "$jythonjar"
36

    
37
add_property python.cachedir "$GVSIG_HOME_FOLDER/plugins/$PLUGIN_NAME/python.cachedir"
38

    
39
xmkdir -p "$GVSIG_HOME_FOLDER/plugins/$PLUGIN_NAME/scripts"
40
cd "$GVSIG_HOME_FOLDER/plugins/$PLUGIN_NAME/scripts"
41

    
42
#
43
# El find casca en win10 64 bits. Parece que hay algun problema con los
44
# pipes y el find y el ls.
45
if [ "${OS}" != "win" ] ; then
46
  sc_autoruns=$(find . -name autorun.sh)
47
  cd "$GVSIG_INSTALL_FOLDER"
48
  for sc_autorun in $sc_autoruns
49
  do
50
    sc_autorun="$GVSIG_HOME_FOLDER/plugins/$PLUGIN_NAME/scripts/$sc_autorun"
51
    if [ -r "$sc_autorun" ] ; then
52
      logger_info "Running scripting autorun from $sc_autorun"
53
      . "$sc_autorun"
54
      cd "$GVSIG_INSTALL_FOLDER"
55
    fi
56
  done
57
fi