From 0d6bcb2b7d08e3a41481372c1ae0d11868d88b1b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 7 Oct 2017 19:32:06 -0300 Subject: New repo layout with git migration --- src/templatepkg | 987 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 987 insertions(+) create mode 100755 src/templatepkg (limited to 'src/templatepkg') diff --git a/src/templatepkg b/src/templatepkg new file mode 100755 index 0000000..c107bd8 --- /dev/null +++ b/src/templatepkg @@ -0,0 +1,987 @@ +#!/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