#!/bin/bash
# dev/docs/config - script documentation configuration
set -e
lib_load 'dev/package/dist'
######
# Libary configuration
dev_docs_config_config_init() {
lib_setting_vars -ro package_docs_srcdir
lib_setting_vars -ro package_docs_gendir
lib_setting_vars -ro package_docs_guidedir
lib_setting_vars -ro package_docs_refdir
lib_setting_vars -ro package_docs_urlbase
lib_setting_vars -ro docs_style
dev_docs_config_config_check
}
dev_docs_config_config_check() {
local default_srcdir="$package_repodir/docs"
package_docs_srcdir=${package_docs_srcdir:-$default_srcdir}
local default_gendir="$package_gendir/docs"
package_docs_gendir=${package_docs_gendir:-$default_gendir}
local default_guidedir="$package_docs_gendir/guide"
package_docs_guidedir=${package_docs_guidedir:-$default_guidedir}
local default_refdir="$package_docs_gendir/ref"
package_docs_refdir=${package_docs_refdir:-$default_refdir}
local version=$(package_version_build_full)
local dirname=$(package_dist_dirname docs "$version")
local default_urlbase="$DOWNLOAD_PATH/docs/$dirname"
is_package_release || default_urlbase="file://$package_docs_gendir"
package_docs_urlbase=${package_docs_urlbase:-$default_urlbase}
docs_style=${docs_style:-autumn}
}
######
# Common Documentation Support
docs_filename() { echo "$1/$2${3:+.}$3"; }
docs_file_exists() { has_args 3 "$@"; [ -f "$(docs_filename "$@")" ]; }
docs_file_list() {
local var=$1
shift
local file_find_opts=( -type f -not -name '.*' )
file_find $var "$@"
qsort_list $var
}
Generated on Sat Jul 8 19:37:34 PDT 2017 by mcsh d14 v0.22.0.