Allow optional install_root in package config

The shared framework packages will want to install to the same root
directory as the "dotnet" package itself. Augment the package_tool
script to look for a json key named `install_root` and use that if
specificed, falling back to `/usr/share/$PACKAGE_NAME` when it is not
present.
This commit is contained in:
Matt Ellis 2016-03-10 00:12:25 -08:00
parent 5cf35e4f38
commit 9004e20cf4

View file

@ -132,7 +132,10 @@ parse_config_and_set_env_vars(){
DOCS_JSON_PATH="$INPUT_DIR/docs.json"
PACKAGE_SOURCE_DIR="${OUTPUT_DIR}/${PACKAGE_NAME}-${PACKAGE_VERSION}"
INSTALL_ROOT="/usr/share/${PACKAGE_NAME}"
if ! INSTALL_ROOT="$($extract_base_cmd $CONFIG "install_root")"; then
INSTALL_ROOT="/usr/share/$PACKAGE_NAME"
fi
DEBIAN_DIR="${PACKAGE_SOURCE_DIR}/debian"
DOCS_DIR="${PACKAGE_SOURCE_DIR}/docs"