ajouter les extensions aux modules
This commit is contained in:
parent
cf9e2ef8c1
commit
95e5fdcbf3
|
@ -1,4 +0,0 @@
|
||||||
# -*- coding: utf-8 mode: awk -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
|
||||||
@include "base.core"
|
|
||||||
@include "base.array"
|
|
||||||
@include "base.date"
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# -*- coding: utf-8 mode: awk -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
@include "base.core.awk"
|
||||||
|
@include "base.array.awk"
|
||||||
|
@include "base.date.awk"
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 mode: awk -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: awk -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
@include "base.core"
|
@include "base.core.awk"
|
||||||
@include "base.array"
|
@include "base.array.awk"
|
||||||
|
|
||||||
function csv__parse_quoted(line, destl, colsep, qchar, echar, pos, tmpl, nextc, resl) {
|
function csv__parse_quoted(line, destl, colsep, qchar, echar, pos, tmpl, nextc, resl) {
|
||||||
line = substr(line, 2)
|
line = substr(line, 2)
|
|
@ -423,14 +423,14 @@ function base_is_debug() {
|
||||||
|
|
||||||
function: lawk "Lancer GNUawk avec la librairie 'base'"
|
function: lawk "Lancer GNUawk avec la librairie 'base'"
|
||||||
function lawk() {
|
function lawk() {
|
||||||
gawk -i base "$@"
|
gawk -i base.awk "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function: cawk "Lancer GNUawk avec LANG=C et la librairie 'base'
|
function: cawk "Lancer GNUawk avec LANG=C et la librairie 'base'
|
||||||
|
|
||||||
Le fait de forcer la valeur de LANG permet d'éviter les problèmes avec la locale"
|
Le fait de forcer la valeur de LANG permet d'éviter les problèmes avec la locale"
|
||||||
function cawk() {
|
function cawk() {
|
||||||
LANG=C gawk -i base "$@"
|
LANG=C gawk -i base.awk "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function: lsort "Lancer sort avec support de la locale courante"
|
function: lsort "Lancer sort avec support de la locale courante"
|
|
@ -7,15 +7,15 @@ if [ -z "$NULIBDIR" -o "$NULIBDIR" != "$NULIBINIT" ]; then
|
||||||
function require:() { :; }
|
function require:() { :; }
|
||||||
function import:() { :; }
|
function import:() { :; }
|
||||||
fi
|
fi
|
||||||
##@include base.init
|
##@include base.init.sh
|
||||||
##@include base.core
|
##@include base.core.sh
|
||||||
##@include base.str
|
##@include base.str.sh
|
||||||
##@include base.arr
|
##@include base.arr.sh
|
||||||
##@include base.io
|
##@include base.io.sh
|
||||||
##@include base.eval
|
##@include base.eval.sh
|
||||||
##@include base.split
|
##@include base.split.sh
|
||||||
##@include base.path
|
##@include base.path.sh
|
||||||
##@include base.args
|
##@include base.args.sh
|
||||||
module: base base_ "Chargement de tous les modules base.*"
|
module: base base_ "Chargement de tous les modules base.*"
|
||||||
NULIB_RECURSIVE_IMPORT=1
|
NULIB_RECURSIVE_IMPORT=1
|
||||||
require: base.init base.core base.str base.arr base.io base.eval base.split base.path base.args
|
require: base.init base.core base.str base.arr base.io base.eval base.split base.path base.args
|
|
@ -3,7 +3,7 @@
|
||||||
##@require nulib.sh
|
##@require nulib.sh
|
||||||
##@require base
|
##@require base
|
||||||
module: git "" "Fonctions pour faciliter l'utilisation de git"
|
module: git "" "Fonctions pour faciliter l'utilisation de git"
|
||||||
require: nulib.sh base
|
require: nulib base
|
||||||
|
|
||||||
function: git_geturl ""
|
function: git_geturl ""
|
||||||
function git_geturl() {
|
function git_geturl() {
|
|
@ -66,7 +66,7 @@ NULIBDIRS=("$NULIBDIR/bash")
|
||||||
NULIBINIT="$NULIBDIR"
|
NULIBINIT="$NULIBDIR"
|
||||||
|
|
||||||
## Modules bash
|
## Modules bash
|
||||||
NULIB_LOADED_MODULES=(nulib.sh)
|
NULIB_LOADED_MODULES=(nulib)
|
||||||
NULIB_DEFAULT_MODULES=(base pretty sysinfos)
|
NULIB_DEFAULT_MODULES=(base pretty sysinfos)
|
||||||
|
|
||||||
# Si cette variable est non vide, require: recharge toujours le module, même
|
# Si cette variable est non vide, require: recharge toujours le module, même
|
||||||
|
@ -115,22 +115,22 @@ function nulib__require:() {
|
||||||
[ -n "$NULIB_SHOULD_IMPORT" ] && NULIB_ALLOW_IMPORT=1
|
[ -n "$NULIB_SHOULD_IMPORT" ] && NULIB_ALLOW_IMPORT=1
|
||||||
nr__found=
|
nr__found=
|
||||||
for nr__nulibdir in "${NULIBDIRS[@]}"; do
|
for nr__nulibdir in "${NULIBDIRS[@]}"; do
|
||||||
if [ -f "$nr__nulibdir/$nr__module" ]; then
|
if [ -f "$nr__nulibdir/$nr__module.sh" ]; then
|
||||||
nr__found=1
|
nr__found=1
|
||||||
if [ -n "$nr__force_reload" ] || ! nulib_check_loaded "$nr__module"; then
|
if [ -n "$nr__force_reload" ] || ! nulib_check_loaded "$nr__module"; then
|
||||||
NULIB_LOADED_MODULES=("${NULIB_LOADED_MODULES[@]}" "$nr__module")
|
NULIB_LOADED_MODULES=("${NULIB_LOADED_MODULES[@]}" "$nr__module")
|
||||||
source "$nr__nulibdir/$nr__module" || base_die
|
source "$nr__nulibdir/$nr__module.sh" || base_die
|
||||||
fi
|
fi
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -z "$nr__found" -a "$nr__module" == DEFAULTS ]; then
|
if [ -z "$nr__found" -a "$nr__module" == DEFAULTS ]; then
|
||||||
for nr__module in "${NULIB_DEFAULT_MODULES[@]}"; do
|
for nr__module in "${NULIB_DEFAULT_MODULES[@]}"; do
|
||||||
if [ -f "$nr__nulibdir/$nr__module" ]; then
|
if [ -f "$nr__nulibdir/$nr__module.sh" ]; then
|
||||||
nr__found=1
|
nr__found=1
|
||||||
if [ -n "$nr__force_reload" ] || ! nulib_check_loaded "$nr__module"; then
|
if [ -n "$nr__force_reload" ] || ! nulib_check_loaded "$nr__module"; then
|
||||||
NULIB_LOADED_MODULES=("${NULIB_LOADED_MODULES[@]}" "$nr__module")
|
NULIB_LOADED_MODULES=("${NULIB_LOADED_MODULES[@]}" "$nr__module")
|
||||||
source "$nr__nulibdir/$nr__module" || base_die
|
source "$nr__nulibdir/$nr__module.sh" || base_die
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue