#!/bin/bash
# i7 - install helper

set -e

source "/home/zwelch/src/mcf/mcsh-release/install/share/mcsh/mcsh.sh"


######
# Makefile filtering CLI

i7_filter() {
	lib_load 'dev/package/make'
	package_make_gen "$@"
}


######
# ChangeLog CLI

i7_changelog() {
	lib_load 'dev/package/changelog'
	cmd_dispatch "$@"
}

i7_changelog_usage() {
	cat <<USAGE
Package ChangeLog Commands:
	all				Generates ChangeLog with all changes
	release <version>		Generates ChangeLog for release tag
USAGE
}

i7_changelog_all() { package_changelog_all "$@"; }
i7_changelog_release() { package_changelog_release "$@"; }


######
# Development environment CLI

i7_env() {
	lib_load 'dev/package/env'
	cmd_dispatch "$@"
}

i7_env_usage() {
	cat <<USAGE
Development Environment Commands:
	bash				Prints Bash environment setup commands
	python				Prints Python environment setup code
USAGE
}

i7_env_bash() { package_env_bash "$@"; }
i7_env_python() { package_env_python "$@"; }


######
# System configuration CLI

i7_system() {
	lib_load 'dev/package/load'
	cmd_dispatch "$@"
}

i7_system_config() {
	cat <<CONFIG
PREFIX="$PREFIX"
EXEC_PREFIX="$EXEC_PREFIX"
DATA_PREFIX="$DATA_PREFIX"
RELEASE_TYPE="$RELEASE_TYPE"
CONFIG
}


######
# Check

i7_check_clone() { package_check_clone "$@"; }
i7_check_build() { package_check_build "$@"; }
i7_check_dist() { package_check_dist "$@"; }
i7_check_archive() { package_check_archive "$@"; }
i7_check_passed() { package_check_passed "$@"; }
i7_check_clean() { package_check_clean "$@"; }

i7_check() {
	local verbose=true
	if [ "$*" ]; then
		lib_load 'dev/package/check'
		cmd_dispatch "$@"
	fi
}
i7_check_usage() {
	cat <<USAGE
...
Package Validation Commands:
	clone <dir>			Clones package into <dir> for testing
	build 				Builds package tests

Distribution Validation Commands:
	dist <dir>			Validates dist package in <dir>
	archive <dir> 			Builds package tests

Validation Management Commands:
	passed				Marks all tests as passed
	clean <dir>			Removes package tests
USAGE
}


######
# Main

i7_desc() { echo "Package installation and distribution tool"; }

i7_usage() {
	cat <<USAGE
<cmd> [...]
General Commands:
	filter <file>			Makefile fragment generation
	env ...				Development environment commands
	system ...			System package configuration commands
USAGE
}

i7_help() {
	cat<<HELP
The $script_name tool automates project creation, management, and
publishing.  This includes generating documentation and releases,
uploading and distributing releases, and sending announcements.

This tool performs actions on the package as a whole.  The d12 tool
provides functionality for working with individual package files as
well as more powerful package introspection.
HELP
}

app_run "$@"

View the Developer Guide Index

View the Reference Manual Index


Generated on Sat Jul 8 19:26:46 PDT 2017 by mcsh d14 v0.22.0.