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
|
||||
@include "base.core"
|
||||
@include "base.array"
|
||||
@include "base.core.awk"
|
||||
@include "base.array.awk"
|
||||
|
||||
function csv__parse_quoted(line, destl, colsep, qchar, echar, pos, tmpl, nextc, resl) {
|
||||
line = substr(line, 2)
|
|
@ -423,14 +423,14 @@ function base_is_debug() {
|
|||
|
||||
function: lawk "Lancer GNUawk avec la librairie 'base'"
|
||||
function lawk() {
|
||||
gawk -i base "$@"
|
||||
gawk -i base.awk "$@"
|
||||
}
|
||||
|
||||
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"
|
||||
function cawk() {
|
||||
LANG=C gawk -i base "$@"
|
||||
LANG=C gawk -i base.awk "$@"
|
||||
}
|
||||
|
||||
function: lsort "Lancer sort avec support de la locale courante"
|
|
@ -7,15 +7,15 @@ if [ -z "$NULIBDIR" -o "$NULIBDIR" != "$NULIBINIT" ]; then
|
|||
function require:() { :; }
|
||||
function import:() { :; }
|
||||
fi
|
||||
##@include base.init
|
||||
##@include base.core
|
||||
##@include base.str
|
||||
##@include base.arr
|
||||
##@include base.io
|
||||
##@include base.eval
|
||||
##@include base.split
|
||||
##@include base.path
|
||||
##@include base.args
|
||||
##@include base.init.sh
|
||||
##@include base.core.sh
|
||||
##@include base.str.sh
|
||||
##@include base.arr.sh
|
||||
##@include base.io.sh
|
||||
##@include base.eval.sh
|
||||
##@include base.split.sh
|
||||
##@include base.path.sh
|
||||
##@include base.args.sh
|
||||
module: base base_ "Chargement de tous les modules base.*"
|
||||
NULIB_RECURSIVE_IMPORT=1
|
||||
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 base
|
||||
module: git "" "Fonctions pour faciliter l'utilisation de git"
|
||||
require: nulib.sh base
|
||||
require: nulib base
|
||||
|
||||
function: git_geturl ""
|
||||
function git_geturl() {
|
|
@ -66,7 +66,7 @@ NULIBDIRS=("$NULIBDIR/bash")
|
|||
NULIBINIT="$NULIBDIR"
|
||||
|
||||
## Modules bash
|
||||
NULIB_LOADED_MODULES=(nulib.sh)
|
||||
NULIB_LOADED_MODULES=(nulib)
|
||||
NULIB_DEFAULT_MODULES=(base pretty sysinfos)
|
||||
|
||||
# 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
|
||||
nr__found=
|
||||
for nr__nulibdir in "${NULIBDIRS[@]}"; do
|
||||
if [ -f "$nr__nulibdir/$nr__module" ]; then
|
||||
if [ -f "$nr__nulibdir/$nr__module.sh" ]; then
|
||||
nr__found=1
|
||||
if [ -n "$nr__force_reload" ] || ! nulib_check_loaded "$nr__module"; then
|
||||
NULIB_LOADED_MODULES=("${NULIB_LOADED_MODULES[@]}" "$nr__module")
|
||||
source "$nr__nulibdir/$nr__module" || base_die
|
||||
source "$nr__nulibdir/$nr__module.sh" || base_die
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$nr__found" -a "$nr__module" == DEFAULTS ]; then
|
||||
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
|
||||
if [ -n "$nr__force_reload" ] || ! nulib_check_loaded "$nr__module"; then
|
||||
NULIB_LOADED_MODULES=("${NULIB_LOADED_MODULES[@]}" "$nr__module")
|
||||
source "$nr__nulibdir/$nr__module" || base_die
|
||||
source "$nr__nulibdir/$nr__module.sh" || base_die
|
||||
fi
|
||||
else
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue