I have a script shell (UBUNTU 14.4) installing an environment for batch processing in PYTHON. It installs GRASS like this :

echo '     installing PYTHON-GDAL    '
echo '-------------------------------'
apt-get install python-gdal
echo '-------------------------------'
echo '     installing GRASS          '
echo '-------------------------------'
apt-get install grass
apt-get install grass-dev

Next, how can I code the installation of GRASS extension (exple : v.centerpoint) in that shell?

  • Do you still have that issue? – George Nostradamos Aug 19 '17 at 18:46
  • No. It's now ok. I used a sh script like this : GISDBASE=$HOME/grassdata LOC=install MAPSET=tmp myGISRC=$HOME/.grassrc echo "GISDBASE: $GISDBASE" > $myGISRC echo "LOCATION_NAME: $LOC" >> $myGISRC echo "MAPSET: $MAPSET" >> $myGISRC export GISRC=$myGISRC # export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib export PYTHONPATH=$PYTHONPATH:$GISBASE/etc/python export GIS_LOCK=$$ g.extension extension=v.centerpoint operation=add GRASS_ADDON_BASE=$HOME/.grass7/addons – Christine Aug 24 '17 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.