diff --git a/lib/nulib/awk/base b/lib/nulib/awk/base deleted file mode 100644 index b62f5c3..0000000 --- a/lib/nulib/awk/base +++ /dev/null @@ -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" diff --git a/lib/nulib/awk/base.array b/lib/nulib/awk/base.array.awk similarity index 100% rename from lib/nulib/awk/base.array rename to lib/nulib/awk/base.array.awk diff --git a/lib/nulib/awk/base.awk b/lib/nulib/awk/base.awk new file mode 100644 index 0000000..ae59617 --- /dev/null +++ b/lib/nulib/awk/base.awk @@ -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" diff --git a/lib/nulib/awk/base.core b/lib/nulib/awk/base.core.awk similarity index 100% rename from lib/nulib/awk/base.core rename to lib/nulib/awk/base.core.awk diff --git a/lib/nulib/awk/base.date b/lib/nulib/awk/base.date.awk similarity index 100% rename from lib/nulib/awk/base.date rename to lib/nulib/awk/base.date.awk diff --git a/lib/nulib/awk/csv b/lib/nulib/awk/csv.awk similarity index 99% rename from lib/nulib/awk/csv rename to lib/nulib/awk/csv.awk index 7f16be4..c58e41b 100644 --- a/lib/nulib/awk/csv +++ b/lib/nulib/awk/csv.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) diff --git a/lib/nulib/awk/enc.base64 b/lib/nulib/awk/enc.base64.awk similarity index 100% rename from lib/nulib/awk/enc.base64 rename to lib/nulib/awk/enc.base64.awk diff --git a/lib/nulib/bash/base.args b/lib/nulib/bash/base.args.sh similarity index 100% rename from lib/nulib/bash/base.args rename to lib/nulib/bash/base.args.sh diff --git a/lib/nulib/bash/base.arr b/lib/nulib/bash/base.arr.sh similarity index 100% rename from lib/nulib/bash/base.arr rename to lib/nulib/bash/base.arr.sh diff --git a/lib/nulib/bash/base.core b/lib/nulib/bash/base.core.sh similarity index 99% rename from lib/nulib/bash/base.core rename to lib/nulib/bash/base.core.sh index ef130f6..757e247 100644 --- a/lib/nulib/bash/base.core +++ b/lib/nulib/bash/base.core.sh @@ -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" diff --git a/lib/nulib/bash/base.eval b/lib/nulib/bash/base.eval.sh similarity index 100% rename from lib/nulib/bash/base.eval rename to lib/nulib/bash/base.eval.sh diff --git a/lib/nulib/bash/base.init b/lib/nulib/bash/base.init.sh similarity index 100% rename from lib/nulib/bash/base.init rename to lib/nulib/bash/base.init.sh diff --git a/lib/nulib/bash/base.io b/lib/nulib/bash/base.io.sh similarity index 100% rename from lib/nulib/bash/base.io rename to lib/nulib/bash/base.io.sh diff --git a/lib/nulib/bash/base.path b/lib/nulib/bash/base.path.sh similarity index 100% rename from lib/nulib/bash/base.path rename to lib/nulib/bash/base.path.sh diff --git a/lib/nulib/bash/base b/lib/nulib/bash/base.sh similarity index 71% rename from lib/nulib/bash/base rename to lib/nulib/bash/base.sh index cc3d388..8755cd1 100644 --- a/lib/nulib/bash/base +++ b/lib/nulib/bash/base.sh @@ -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 diff --git a/lib/nulib/bash/base.split b/lib/nulib/bash/base.split.sh similarity index 100% rename from lib/nulib/bash/base.split rename to lib/nulib/bash/base.split.sh diff --git a/lib/nulib/bash/base.str b/lib/nulib/bash/base.str.sh similarity index 100% rename from lib/nulib/bash/base.str rename to lib/nulib/bash/base.str.sh diff --git a/lib/nulib/bash/git b/lib/nulib/bash/git.sh similarity index 99% rename from lib/nulib/bash/git rename to lib/nulib/bash/git.sh index 99c213b..b3cc005 100644 --- a/lib/nulib/bash/git +++ b/lib/nulib/bash/git.sh @@ -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() { diff --git a/lib/nulib/bash/pretty b/lib/nulib/bash/pretty.sh similarity index 100% rename from lib/nulib/bash/pretty rename to lib/nulib/bash/pretty.sh diff --git a/lib/nulib/bash/sysinfos b/lib/nulib/bash/sysinfos.sh similarity index 100% rename from lib/nulib/bash/sysinfos rename to lib/nulib/bash/sysinfos.sh diff --git a/lib/nulib/load.sh b/lib/nulib/load.sh index b6ad3c1..017c545 100644 --- a/lib/nulib/load.sh +++ b/lib/nulib/load.sh @@ -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