This commit is contained in:
Jephté Clain 2013-10-31 14:46:06 +04:00
parent cfdce28833
commit 2c64e083d4
6 changed files with 33 additions and 49 deletions

View File

@ -265,19 +265,14 @@ for file in "$@"; do
esac esac
fi fi
if [ "$t" == javaproperties ]; then case "$t" in
generate_javaproperties "$file" files2edit || r=$? javaproperties|properties|jprops|props) generate_javaproperties "$file" files2edit || r=$?;;
elif [ "$t" == java ]; then java|j) generate_java "$file" files2edit || r=$?;;
generate_java "$file" files2edit || r=$? woapi|api) generate_woapi "$file" files2edit || r=$?;;
elif [ "$t" == woapi ]; then wosrc) generate_wosrc "$file" files2edit || r=$?;;
generate_woapi "$file" files2edit || r=$? wosrccomp|wc) generate_wosrccomp "$file" files2edit || r=$?;;
elif [ "$t" == wosrc ]; then *) die "$NAME: template invalide: $t";;
generate_wosrc "$file" files2edit || r=$? esac
elif [ "$t" == wosrccomp ]; then
generate_wosrccomp "$file" files2edit || r=$?
else
die "java: template invalide: $t"
fi
done done
if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then

View File

@ -103,11 +103,10 @@ for file in "$@"; do
# du nom de fichier. Rajouter ici le code approprié # du nom de fichier. Rajouter ici le code approprié
fi fi
if [ "$t" == XXX ]; then case "$t" in
generate_XXX "$file" files2edit || r=$? XXX) generate_XXX "$file" files2edit || r=$?;;
else *) die "$NAME: template invalide: $t";;
die "XXX: template invalide: $t" esac
fi
done done
if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then

View File

@ -219,11 +219,10 @@ for file in "$@"; do
# du nom de fichier. Rajouter ici le code approprié # du nom de fichier. Rajouter ici le code approprié
fi fi
if [ "$t" == shell ]; then case "$t" in
generate_shell "$file" files2edit || r=$? shell|sh) generate_shell "$file" files2edit || r=$?;;
else *) die "$NAME: template invalide: $t";;
die "shell: template invalide: $t" esac
fi
done done
if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then

View File

@ -36,7 +36,9 @@ TEMPLATES=(
jdp:javadoc-package jdp:javadoc-package
ctp:cakephp-ctp ctp:cakephp-ctp
js:javascript js:javascript
j:java
properties:javaproperties jprops:javaproperties props:javaproperties properties:javaproperties jprops:javaproperties props:javaproperties
wc:wosrccomp
) )
# Scripts à utiliser pour générer les templates # Scripts à utiliser pour générer les templates

View File

@ -122,15 +122,12 @@ for file in "$@"; do
# du nom de fichier. Rajouter ici le code approprié. # du nom de fichier. Rajouter ici le code approprié.
fi fi
if [ "$t" == text ]; then case "$t" in
generate_text "$file" files2edit || r=$? text|txt|t) generate_text "$file" files2edit || r=$?;;
elif [ "$t" == conf ]; then conf|c) generate_conf "$file" files2edit || r=$?;;
generate_conf "$file" files2edit || r=$? sql) generate_sql "$file" files2edit || r=$?;;
elif [ "$t" == sql ]; then *) die "$NAME: template invalide: $t";;
generate_sql "$file" files2edit || r=$? esac
else
die "text: template invalide: $t"
fi
done done
if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then

View File

@ -339,23 +339,15 @@ for file in "$@"; do
esac esac
fi fi
if [ "$t" == html ]; then case "$t" in
generate_html "$file" files2edit || r=$? html|htm) generate_html "$file" files2edit || r=$?;;
elif [ "$t" == javadoc-package ]; then javadoc-package|jdp) generate_javadoc_package "$file" files2edit || r=$?;;
generate_javadoc_package "$file" files2edit || r=$? jadadoc-overview|jdo) generate_javadoc_overview "$file" files2edit || r=$?;;
elif [ "$t" == javadoc-overview ]; then php|phps) generate_php "$file" files2edit || r=$?;;
generate_javadoc_overview "$file" files2edit || r=$? cakephp-ctp|ctp) generate_cakephp_ctp "$file" files2edit || r=$?;;
elif [ "$t" == php ]; then css) generate_css "$file" files2edit || r=$?;;
generate_php "$file" files2edit || r=$? javascript|js) generate_javascript "$file" files2edit || r=$?;;
elif [ "$t" == cakephp-ctp ]; then *) die "$NAME: template invalide: $t";;
generate_cakephp_ctp "$file" files2edit || r=$?
elif [ "$t" == css ]; then
generate_css "$file" files2edit || r=$?
elif [ "$t" == javascript ]; then
generate_javascript "$file" files2edit || r=$?
else
die "www: template invalide: $t"
fi
done done
if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then if [ -n "$edit" -a "${#files2edit[*]}" -gt 0 ]; then