#!/bin/bash

# How to update the anaconda-docs package, used by offline and airgap users:
# - Increment version number in meta.yaml.
# - Run these commands:
#       cd ~/docs
#       git checkout master
#       git pull
#       cd docs.recipe
#       conda build .
# - Email the .tar.bz2 to the team lead so they can add it to
#   the main channel at https://repo.anaconda.com/pkgs/.
# Currently we do not add to the channel "free", so customers with
# conda < 4.3.27 will need to update conda or set conda to use the "main"
# channel. 

cd $RECIPE_DIR/..
mkdir -p $PREFIX/share/doc
curl -L https://readthedocs.com/projects/continuumio-docs/downloads/pdf/latest/ > $PREFIX/share/doc/anaconda.pdf
curl -L https://readthedocs.com/projects/continuumio-docs/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda.zip
curl -L https://readthedocs.com/projects/continuumio-anaconda-platform/downloads/pdf/latest/ > $PREFIX/share/doc/anaconda-enterprise-5.pdf
curl -L https://readthedocs.com/projects/continuumio-anaconda-platform/downloads/htmlzip/latest/ > $PREFIX/share/doc/anaconda-enterprise-5.zip
