#!/bin/bash
# sys/vc14 - Version Control Helper

set -e

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

lib_load 'dev/vcs'

######
# Script Configuration

# vc14_config_init() - Defines, documents, and initializes script settings.
vc14_config_init() {
	# vc14_var - Documents this setting variable
	lib_setting_vars vc14_var
}

# vc14_config_check() - Initializes remaining script settings and
# validates their values.
vc14_config_check() {
	vc14_var=${vc14_var:-true}
}


######
# Projects

# vc14_project_clone() - Reads the project file and clones its repositories
# into the current directory.
vc14_project_clone() {
	local file=$1
	with_vcs_project "$file" vcs_project_repos_clone
}


# vc14_clone() - Creates a local copy of a repository ($1) given its type
# ($2) and URL ($3)
vc14_clone_repo() {
	local name=$1
	local tool=$2
	local url=$3

	case "$tool" in
	(git) git_clone "$url" "$name" ;;
	(svn) git_svn_clone "$url" "$name" ;;
	(*) error "$tool: unsupported tool" ;;
	esac
}


######
# Check

# vc14_check() - Performs a self-check of all script functionality
vc14_check() {
	vc14_func
}


######
# Main

# vc14_desc() - Prints a short description of the vc14 script
vc14_desc() { echo "Version Control Helper"; }

# vc14_usage() - Prints the top-level command usage for the vc14 script
vc14_usage() {
	cat <<USAGE
...
vc14 Commands:
	func				Tests the vc14 tool
USAGE
}

# vc14_help() - Prints the top-level command help for this script
vc14_help() {
	cat <<HELP
vc14 is a Version Control Helper tool.  It is part of the mcsh package.
HELP
}

app_run "$@"

View the Developer Guide Index

View the Reference Manual Index


Generated on Fri Jul 28 14:34:48 PDT 2017 by mcsh d14 v0.23.0.