aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/templatepkg
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/templatepkg')
-rwxr-xr-xtrunk/src/templatepkg26
1 files changed, 13 insertions, 13 deletions
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg
index ad7306f..e1533c7 100755
--- a/trunk/src/templatepkg
+++ b/trunk/src/templatepkg
@@ -177,7 +177,7 @@ function import_export_templates {
if [ "$?" != 0 ]; then
usage
exit 1
- elif ! use_svn; then
+ elif ! templates_under_svn; then
echo $BASENAME: simplepkg not configured to use svn
exit 1
fi
@@ -242,7 +242,7 @@ function template_create {
echo Creating template `basename $TEMPLATE_BASE`...
- if use_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
+ if templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
cd `dirname $TEMPLATE_BASE`
svn mkdir `dirname $TEMPLATE_BASE`
else
@@ -257,7 +257,7 @@ function template_create {
touch $TEMPLATE_BASE.perms
touch $TEMPLATE_BASE.template
- if use_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
+ if templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
cd `dirname $TEMPLATE_BASE`
@@ -285,7 +285,7 @@ function template_create {
info_commit="yes"
fi
- elif use_svn && [ -d "$TEMPLATE_FOLDER/.svn" ]; then
+ elif templates_under_svn && [ -d "$TEMPLATE_FOLDER/.svn" ]; then
mkdir $TEMPLATE_BASE.{d,s}
cd $TEMPLATE_FOLDER
@@ -320,7 +320,7 @@ function template_create {
cat $orig_template/$ROOT.template > $TEMPLATE_BASE.template
fi
- if use_svn && [ -d "$orig_template/.svn" ]; then
+ if templates_under_svn && [ -d "$orig_template/.svn" ]; then
cd `dirname $TEMPLATE_BASE`
@@ -448,7 +448,7 @@ function template_add {
if [ ! -a "$TEMPLATE_BASE.d/$candidate" ]; then
mkdir -p $TEMPLATE_BASE.d/`dirname $candidate`
cp -a $jail/$candidate $TEMPLATE_BASE.d/$candidate
- if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+ if templates_under_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
cwd="`pwd`"
cd $TEMPLATE_BASE.d
svn add ./$candidate
@@ -477,7 +477,7 @@ function template_add {
destination="`echo $TEMPLATE_BASE.d/$file | sed -e 's/\/$//'`"
- if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+ if templates_under_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
candidate="./`dirname $file`"
mkdir -p $TEMPLATE_BASE.d/$candidate
@@ -552,12 +552,12 @@ function check_template_exist {
mkdir $TEMPLATE_BASE.$component
fi
- if use_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
+ if templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
svn add $TEMPLATE_BASE.$component
info_commit="yes"
fi
- elif use_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ] && \
+ elif templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ] && \
! svn_check $TEMPLATE_BASE.$component; then
cd `dirname $TEMPLATE_BASE`
@@ -582,7 +582,7 @@ function template_delete {
if [ -e "$TEMPLATE_BASE.d/$1" ]; then
# first try to remove the file from the template
- if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+ if templates_under_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
cd $TEMPLATE_BASE.d
svn del --force ./$1 || rm -rf ./$1
if [ -z "$SILENT" ]; then
@@ -606,7 +606,7 @@ function template_delete {
fi
elif [ -e "$TEMPLATE_BASE.s/$1" ]; then
- if use_svn && [ -d "$TEMPLATE_BASE.s/.svn" ]; then
+ if templates_under_svn && [ -d "$TEMPLATE_BASE.s/.svn" ]; then
cd $TEMPLATE_BASE.s
svn del --force ./$1 || rm -rf ./$1
if [ -z "$SILENT" ]; then
@@ -642,7 +642,7 @@ function template_remove {
exit 1
fi
- if use_svn && [ -d "$basedir/.svn" ]; then
+ if templates_under_svn && [ -d "$basedir/.svn" ]; then
cd $TEMPLATE_FOLDER
svn update
svn del --force $template
@@ -938,7 +938,7 @@ elif [ "$1" == "-d" ] || [ "$1" == "--delete" ]; then
elif [ "$1" == "-s" ] || [ "$1" == "--sync" ]; then
- if use_svn && [ -d "$TEMPLATE_FOLDER/.svn" ]; then
+ if templates_under_svn && [ -d "$TEMPLATE_FOLDER/.svn" ]; then
( cd $TEMPLATE_FOLDER && svn update )
true
fi