Intégration de la branche release-11.3.0

This commit is contained in:
Jephté Clain 2024-09-24 16:02:01 +04:00
commit 0527aee96e
6 changed files with 22 additions and 12 deletions

View File

@ -1,3 +1,9 @@
## Version 11.3.0 du 24/09/2024-16:02
* `625d5f1` bug mineur
* `e308202` dkbuild: améliorer from_glob()
* `5c03184` lgrep, lless: modifier la doc pour ne parler que d'un fichier
## Version 11.2.0 du 21/06/2024-20:34 ## Version 11.2.0 du 21/06/2024-20:34
* `21042e4` bug * `21042e4` bug

View File

@ -1 +1 @@
11.2.0 11.3.0

14
dkbuild
View File

@ -1188,12 +1188,14 @@ function load_environ() {
} }
function from_glob() { function from_glob() {
local var=value value local vvalue=value value vfile=file file
[[ "$1" != *=* ]] && { var="$1"; shift; } [[ "$1" != *=* ]] && { vvalue="$1"; shift; }
[[ "$1" != *=* ]] && { vfile="$1"; shift; }
local path extract add_prefix add_suffix local basedir path extract add_prefix add_suffix
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
basedir=*) basedir="${1#basedir=}";;
path=*) path="${1#path=}";; path=*) path="${1#path=}";;
extract=*) extract="${1#extract=}";; extract=*) extract="${1#extract=}";;
add-prefix=*) add_prefix="${1#add-prefix=}";; add-prefix=*) add_prefix="${1#add-prefix=}";;
@ -1203,7 +1205,9 @@ function from_glob() {
esac esac
shift shift
done done
value="$(list_all . "$path" | sort -rn | head -1)" [ -n "$basedir" ] || basedir=.
value="$(list_all "$basedir" "$path" | sort -rn | head -1)"
file="$basedir/$value"
[ -n "$extract" ] || extract="${path//\*/(.*)}" [ -n "$extract" ] || extract="${path//\*/(.*)}"
if [ -n "$extract" ]; then if [ -n "$extract" ]; then
extract="${extract//\//\\/}" extract="${extract//\//\\/}"
@ -1213,7 +1217,7 @@ function from_glob() {
}")$add_suffix" }")$add_suffix"
fi fi
local "$var"; upvar "$var" "$value" local "$vvalue" "$vfile"; upvars "$vvalue" "$value" "$vfile" "$file"
} }
function define_functions_env() { function define_functions_env() {
function setversion() { function setversion() {

4
lgrep
View File

@ -3,10 +3,10 @@
source "$(dirname "$0")/lib/ulib/auto" || exit 1 source "$(dirname "$0")/lib/ulib/auto" || exit 1
function display_help() { function display_help() {
uecho "$scriptname: frontend de grep pour lire des fichiers encodés en latin1 uecho "$scriptname: frontend de grep pour chercher dans un fichier encodé en latin1
USAGE USAGE
$scriptname [options] files... $scriptname [options] FILE
OPTIONS OPTIONS
options de grep qui sont reprises telles quelles" options de grep qui sont reprises telles quelles"

View File

@ -213,7 +213,7 @@ function tl_modifyattr() {
dn = "" dn = ""
} }
sub(/:+$/, "", attr) sub(/:+$/, "", attr)
if (lastattr != attr) { if (tolower(lastattr) != tolower(attr)) {
if (lastattr != "") { if (lastattr != "") {
print "-" print "-"
} }
@ -248,7 +248,7 @@ function tl_deleteattr() {
dn = "" dn = ""
} }
sub(/:+$/, "", attr) sub(/:+$/, "", attr)
if (lastattr != attr) { if (tolower(lastattr) != tolower(attr)) {
if (lastattr != "") { if (lastattr != "") {
print "-" print "-"
} }

4
lless
View File

@ -3,10 +3,10 @@
source "$(dirname "$0")/lib/ulib/auto" || exit 1 source "$(dirname "$0")/lib/ulib/auto" || exit 1
function display_help() { function display_help() {
uecho "$scriptname: frontend de less pour lire des fichiers encodés en latin1 uecho "$scriptname: frontend de less pour lire un fichier encodé en latin1
USAGE USAGE
$scriptname [options] files... $scriptname [options] FILE
OPTIONS OPTIONS
-S, --chop-long-lines -S, --chop-long-lines