From f76d87c78ade79c700b6dd48aeb6b8bbef60cf34 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 13 Apr 2007 21:46:27 +0000 Subject: created 0.6 branch git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@341 04377dda-e619-0410-9926-eae83683ac58 --- branches/0.6/src/templatepkg | 959 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 959 insertions(+) create mode 100755 branches/0.6/src/templatepkg (limited to 'branches/0.6/src/templatepkg') diff --git a/branches/0.6/src/templatepkg b/branches/0.6/src/templatepkg new file mode 100755 index 0000000..048ac22 --- /dev/null +++ b/branches/0.6/src/templatepkg @@ -0,0 +1,959 @@ +#!/bin/bash +# +# templatepkg v0.3: 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 +# + +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