From 50e9ff935ab83825c62552d5f013274e812ecf58 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 2 Dec 2017 03:00:04 +0000 Subject: [PATCH] etc/profile.d/functions --- etc/profile.d/functions | 13 +++++++++++++ lib/php/db/dbq.php | 2 -- share/db/update.sh | 6 ++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index a376b33b..05f6f4b5 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -758,6 +758,19 @@ while (@_) { } shell_replace() { + + local usage="Usage: shell_replace [-i[.BACKUP_EXTENSION]] [-find PAHT]" + if [ -z "$*" -o "$1" = "--help" -o "$1" = "-h" ]; then + echo "$usage" + return + fi + + if [ "$1" = "-find" ]; then + shift + grep -ErlI '^.{1,3}SHELL_REPLACE (.*)$/ .. /^\s*.{1,3}pdef('format',$Db->content_type2format()); -#$Db->pdef('action','db.ls'); -#bye(nb::P('action')); return $Db->action($Db->p('action'),$Table); ?> diff --git a/share/db/update.sh b/share/db/update.sh index 9de55d2d..a3d521ac 100755 --- a/share/db/update.sh +++ b/share/db/update.sh @@ -91,9 +91,15 @@ EOF #cp -a "$tmp/" /Users/nico/Downloads/commit/ rm -rf "$tmp" +( + +export DBQ_PARAMS="db=nb-sys" + for f in $(grep -ErlI '^.{1,3}