#!/bin/bash # # templatepkg: template maintenance script from simplepkg suite # feedback: rhatto at riseup.net | gpl # # Templatepkg is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # Templatepkg is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # $Rev$ - $Author$ # COMMON="/usr/libexec/simplepkg/common.sh" BASENAME="`basename $0`" if [ -f "$COMMON" ]; then source $COMMON eval_config $BASENAME else echo "error: file $COMMON found, check your $BASENAME installation" exit 1 fi function usage_summary { echo "options are:" echo "" echo " -c | --create: create a template from a jail or existing template" echo " -u | --update: update a template from a jail" echo " -a | --add: add files into a template" echo " -d | --delete: delete files or folders from a template" echo " -s | --sync: sync $TEMPLATE_FOLDER working copy" echo " -e | --export: export $TEMPLATE_FOLDER to a svn repository" echo " -i | --import: grab $TEMPLATE_FOLDER from a svn repository" echo " -r | --remove: remove a template" echo " -l | --list: list templates" echo " -b | --batch-edit: add or edit post-installation scripts" echo " -p | --pack: create a package from a template" echo " -t | --template-edit: edit template package list" echo " -h | --help: display this summary" echo "" } function display_help { # display help # usage: help [help-topic] local option if [ -z "$1" ]; then echo "type $BASENAME --help