<commit_before>#!/bin/sh
# Copyright (c) 2009 The Open Source Geospatial Foundation.
# Copyright (c) 2009 LISAsoft
# Copyright (c) 2009 <NAME>
# Licensed under the GNU LGPL.
# 
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License,
# or any later version.  This library is distributed in the hope that
# it will be useful, but WITHOUT ANY WARRANTY, without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details, either
# in the "LICENSE.LGPL.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".

# About:
# =====
# This script will install documentation from 

# Running:
# =======
# sudo ./install_main_docs.sh


if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"
DEST="/var/www"
DATA_FOLDER="/usr/local/share/data"
BIN_DIR=`pwd`


apt-get --assume-yes install python-sphinx

# Use sphynx to build the OSGeo-Live documentation
cd ${BIN_DIR}/../doc
make clean
make html

# Create target directory if it doesn't exist
mkdir -p ${DEST}

# Remove then replace target documentation, leaving other files
cd ${BIN_DIR}/../doc/_build/html
for FILE in `ls` ; do
  rm -fr ${DEST}/${FILE}
done
mv * ${DEST}

# Create symbolic links to project specific documentation
cd ${DEST}
# PDF
ln -s /usr/local/share/udig/udig-docs .
if [ -d /usr/local/mbsystem ] ; then
   ln -s /usr/local/mbsystem .
fi
ln -s /usr/local/share/qgis .
ln -s /usr/share/doc/geopublishing-doc geopublishing
ln -s /usr/local/share/saga .
# HTML
ln -s /usr/share/doc/gmt .
ln -s /usr/share/doc/gmt-examples .
ln -s /usr/share/doc/gmt-tutorial .
ln -s /usr/local/share/mapnik/demo mapnik
ln -s /usr/local/share/mapserver/doc mapserver
ln -s /usr/local/share/opencpn/doc opencpn
ln -s /usr/local/share/ushahidi .
ln -s /usr/local/share/otb .
ln -s /usr/local/share/ossim .
# Data
ln -s /usr/local/share/data .

# Create symbolic links to project specific data
mkdir -p ${DATA_FOLDER}
ln -s ${DATA_FOLDER} .

cd ${BIN_DIR}

echo "install_main_docs.sh: Double-check that the Firefox \
home page is now set to file://$DEST/index.html"
# ~user/.mozilla/ has to exist first, so firefox would have need<commit_msg>add link to grass docs, fix link to opencpn docs<commit_after>#!/bin/sh
# Copyright (c) 2009 The Open Source Geospatial Foundation.
# Copyright (c) 2009 LISAsoft
# Copyright (c) 2009 <NAME>
# Licensed under the GNU LGPL.
# 
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License,
# or any later version.  This library is distributed in the hope that
# it will be useful, but WITHOUT ANY WARRANTY, without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details, either
# in the "LICENSE.LGPL.txt" file distributed with this software or at
# web page "http://www.fsf.org/licenses/lgpl.html".

# About:
# =====
# This script will install documentation from 

# Running:
# =======
# sudo ./install_main_docs.sh


if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"
DEST="/var/www"
DATA_FOLDER="/usr/local/share/data"
BIN_DIR=`pwd`


apt-get --assume-yes install python-sphinx

# Use sphynx to build the OSGeo-Live documentation
cd ${BIN_DIR}/../doc
make clean
make html

# Create target directory if it doesn't exist
mkdir -p ${DEST}

# Remove then replace target documentation, leaving other files
cd ${BIN_DIR}/../doc/_build/html
for FILE in `ls` ; do
  rm -fr ${DEST}/${FILE}
done
mv * ${DEST}

# Create symbolic links to project specific documentation
cd ${DEST}
# PDF
ln -s /usr/local/share/udig/udig-docs .
if [ -d /usr/local/mbsystem ] ; then
   ln -s /usr/local/mbsystem .
fi
ln -s /usr/local/share/qgis .
ln -s /usr/share/doc/geopublishing-doc geopublishing
ln -s /usr/local/share/saga .
# HTML
ln -s /usr/share/doc/gmt .
ln -s /usr/share/doc/gmt-examples .
ln -s /usr/share/doc/gmt-tutorial .
ln -s /usr/share/doc/grass-doc/html grass
ln -s /usr/local/share/mapnik/demo mapnik
ln -s /usr/local/share/mapserver/doc mapserver
ln -s /usr/share/doc/opencpn-doc/doc opencpn
ln -s /usr/local/share/ushahidi .
ln -s /usr/local/share/otb .
ln -s /usr/local/share/ossim .
# Data
ln -s /usr/local/share/data .

# Create symbolic links to project specific data
mkdir -p ${DATA_FOLDER}
ln -s ${DATA_FOLDER} .

cd ${BIN_DIR}

echo "install_main_docs.sh: Double-check that the Firefox \
home page is now set to file://$DEST/index.html"
# ~user/.mozilla/ has to exist first, so firefox would have need
{'fraction_non_alphanumeric': 0.12271325796505653, 'fraction_numerical': 0.0057553956834532375, 'mean_word_length': 3.5819209039548023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '84070', 'n_tokens_mistral': 1717, 'n_tokens_neox': 1643, 'n_words': 584}