From f6d0f28e4c6e7efcd8932a55d2adb520b8b03bf8 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 12 Aug 2016 00:50:36 +0200 Subject: [PATCH] dbq-shell --- bin/dbq | 5 +++++ bin/dbq-shell | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100755 bin/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 -- 2.47.3