Intégration de la branche release-8.3.0

This commit is contained in:
Jephté Clain 2018-11-15 09:32:01 +04:00
commit db30c4e342
7 changed files with 34 additions and 4 deletions

View File

@ -1,3 +1,11 @@
## Version 8.3.0 du 15/11/2018-09:32
* `7ff32ca` dk brd honore les scripts de build
* `3293d09` support docker-machine use
* `e6be47e` ajouter de nouveaux formats pour parse_date
* `1151b5c` latin1compat gère les points de suspension
* `2f86786` ajouter le template pour yaml
## Version 8.2.0 du 02/11/2018-15:06
* `7583ded` Intégration de la branche update-pff

View File

@ -1 +1 @@
8.2.0
8.3.0

2
dk
View File

@ -352,6 +352,8 @@ while [ $# -gt 0 ]; do
}
trap auto_down_trap 1 3 15 EXIT
[ -f .build.scripts.sh ] && source ./.build.scripts.sh
[ -f build.scripts.sh ] && source ./build.scripts.sh
args=()
while [ $# -gt 0 -a "$1" != -- ]; do
args+=("$1"); shift

View File

@ -23,6 +23,9 @@ if [ -n "$UTOOLS_BASH_PROMPT" ]; then
local cvs svn git pff uinst woinst suffix p="$PWD"
if [ -n "$UTOOLS_AUTO" ]; then
PS1=
if [ "$DOCKER_MACHINE_WRAPPED" == true -a -n "$DOCKER_MACHINE_NAME" ]; then
PS1="DK-|$DOCKER_MACHINE_NAME|"
fi
while [ "$p" != "$HOME" -a "$p" != "" ]; do
if [ -z "$cvs" -a -d "$p/CVS" ]; then
PS1="${PS1:+$PS1,}cvs$suffix"

View File

@ -25,6 +25,7 @@ EXTS=(
java:java api:wosrccomp wosrc:wosrccomp properties:javaproperties
pp:ppfile
jgo:javago
yml:yaml yaml:yaml
)
# Aliases de templates
@ -49,7 +50,7 @@ TEMPLATES=(
# Scripts à utiliser pour générer les templates
TEMPLS=(
text:text conf:text sql:text sieve:text
text:text conf:text sql:text sieve:text yaml:text
markdown:wiki tiddlywiki:wiki
puml:plantuml iuml:plantuml
shell:shell

View File

@ -23,9 +23,9 @@ OPTIONS
}
NAME=text
TEMPLATES=(text conf sql sieve)
TEMPLATES=(text conf sql sieve yaml)
NAMES=()
EXTS=(txt conf sql sieve)
EXTS=(txt conf sql sieve yml yaml)
if [ $# -eq 2 ]; then
if [ "$1" == "--matches-template" ]; then
@ -102,6 +102,17 @@ function generate_sieve() {
return 0
}
function generate_yaml() {
local file="$1"
local mode=yaml
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=
@ -137,6 +148,7 @@ for file in "$@"; do
conf|c) generate_conf "$file" files2edit || r=$?;;
sql) generate_sql "$file" files2edit || r=$?;;
sieve) generate_sieve "$file" files2edit || r=$?;;
yaml) generate_yaml "$file" files2edit || r=$?;;
*) die "$NAME: template invalide: $t";;
esac
done

View File

@ -393,7 +393,9 @@ function parse_date() {
local value="$1" type="${2:-date}"
local now="$(awk 'BEGIN { print mktime(strftime("%Y %m %d 00 00 00 +0400")) }')"
case "$value" in
=*) value="${value#=}";;
+*) value="$(($now + ${value#+} * 86400))";;
-*) value="$(($now - ${value#-} * 86400))";;
*) value="$(<<<"$value" awk -F/ '{
nd = strftime("%d"); nm = strftime("%m"); ny = strftime("%Y")
d = $1 + 0; if (d < 1) d = nd;
@ -407,6 +409,7 @@ function parse_date() {
d|date) awk '{ print strftime("%d/%m/%Y", $0 + 0) }' <<<"$value";;
l|ldap) awk '{ print strftime("%Y%m%d%H%M%S+0400", $0 + 0) }' <<<"$value";;
m|mysql) awk '{ print strftime("%Y-%m-%d", $0 + 0) }' <<<"$value";;
t|ts|timestamp) echo "$value";;
*) recho "$value";;
esac
}
@ -1225,6 +1228,7 @@ s/[\xE2\x80\x90\xE2\x80\x91\xE2\x80\x92\xE2\x80\x93\xE2\x80\x94\xE2\x80\x95]/-/g
s/[]/\x27/g
s/[«»“”]/"/g
s/[\xC2\xA0\xE2\x80\x87\xE2\x80\xAF\xE2\x81\xA0]/ /g
s/[\xE2\x80\xA6]/.../g
s/[œ]/oe/g
s/[Œ]/OE/g
s/[æ]/ae/g