ajout de sieve
This commit is contained in:
parent
272c504d37
commit
0e7c9623c5
|
@ -10,6 +10,7 @@ EXTS=(
|
|||
txt:text
|
||||
conf:conf
|
||||
sql:sql
|
||||
sieve:sieve
|
||||
mdt:markdown mdwn:markdown md:markdown text:markdown
|
||||
twp:twpage
|
||||
puml:puml
|
||||
|
@ -43,7 +44,7 @@ TEMPLATES=(
|
|||
|
||||
# Scripts à utiliser pour générer les templates
|
||||
TEMPLS=(
|
||||
text:text conf:text sql:text
|
||||
text:text conf:text sql:text sieve:text
|
||||
markdown:wiki twpage:wiki
|
||||
puml:plantuml iuml:plantuml
|
||||
shell:shell
|
||||
|
|
|
@ -23,9 +23,9 @@ OPTIONS
|
|||
}
|
||||
|
||||
NAME=text
|
||||
TEMPLATES=(text conf sql)
|
||||
TEMPLATES=(text conf sql sieve)
|
||||
NAMES=()
|
||||
EXTS=(txt conf sql)
|
||||
EXTS=(txt conf sql sieve)
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
if [ "$1" == "--matches-template" ]; then
|
||||
|
@ -92,6 +92,17 @@ function generate_sql() {
|
|||
return 0
|
||||
}
|
||||
|
||||
function generate_sieve() {
|
||||
local file="$1"
|
||||
local mode=sieve
|
||||
|
||||
check_overwrite "$1" || return
|
||||
estep "$(ppath "$file")"
|
||||
echo >"$file" "-- -*- coding: $encoding ${mode:+mode: $mode }-*- vim:sw=4:sts=4:et:ai:si:sta:fenc=$encoding"
|
||||
[ -n "$2" ] && array_add "$2" "$file"
|
||||
return 0
|
||||
}
|
||||
|
||||
template=
|
||||
edit=1
|
||||
overwrite=
|
||||
|
@ -126,6 +137,7 @@ for file in "$@"; do
|
|||
text|txt|t) generate_text "$file" files2edit || r=$?;;
|
||||
conf|c) generate_conf "$file" files2edit || r=$?;;
|
||||
sql) generate_sql "$file" files2edit || r=$?;;
|
||||
sieve) generate_sieve "$file" files2edit || r=$?;;
|
||||
*) die "$NAME: template invalide: $t";;
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue