From: Nicolas Boisselier Date: Thu, 11 Aug 2016 22:50:36 +0000 (+0200) Subject: dbq-shell X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=f6d0f28e4c6e7efcd8932a55d2adb520b8b03bf8;p=nb.git dbq-shell --- diff --git a/bin/dbq b/bin/dbq index c87a723d..bc939a24 100755 --- a/bin/dbq +++ b/bin/dbq @@ -4,6 +4,11 @@ use warnings; use Encode; use URI::Escape; use File::Spec; + +BEGIN { + use Cwd; + unshift(@INC, Cwd::abs_path( ($0 =~ m|^(.*?)/[^/]+$| ? $1 : '/').'/../lib/perl' )) +} use NB::Functions qw/html2txt/; use NB qw/$ROOT_DIR/; ################################################################################# diff --git a/bin/dbq-shell b/bin/dbq-shell new file mode 100755 index 00000000..d251fcb4 --- /dev/null +++ b/bin/dbq-shell @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +NAME="$(basename "${0}")" +PATH="$PATH:$(cd "$(dirname "${0}")"; echo $(pwd))" +while read line; + do eval "dbq $line" +done