echo " file-name: the file or directory to be added"
echo " jail-root: the jail under file-name is located"
echo ""
- echo " in all cases, jail-root defaults to / if ommited"
+ echo " -d | --delete: delete files or folders from a template; arguments are:"
+ echo ""
+ echo " $BASENAME -d <template> <file-name>"
+ echo ""
+ echo " in all cases (-c, -u and -a), jail-root defaults to /, if ommited"
echo ""
exit 1
template_add $ROOT $3
+elif [ "$1" == "-d" ] || [ "$1" == "--delete" ]; then
+
+ if [ -z "$3" ]; then
+ usage
+ else
+
+ if [ -a "$TEMPLATE_BASE.d/$3" ]; then
+ if [ "$TEMPLATES_UNDER_SVN" == "1" ]; then
+ cd $TEMPLATE_BASE
+ svn del --force ./$3 || rm -rf ./$3
+ echo $BASENAME: please run jail-commit to del $3 in the svn repository
+ else
+ rm -rf $TEMPLATE_BASE.d/$3
+ fi
+ fi
+
+ fi
+
else
usage
fi