From fc92486a02cf62958ea93cdd0a0b0cb12c5beb50 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 7 Apr 2013 03:56:27 +0200 Subject: [PATCH] bin: Add pdftotext- and sqlite3dump. Used for Git's textconv. --- bin/pdftotext- | 21 +++++++++++++++++++++ bin/sqlite3dump | 23 +++++++++++++++++++++++ gitconfig.m4 | 4 ++-- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100755 bin/pdftotext- create mode 100755 bin/sqlite3dump diff --git a/bin/pdftotext- b/bin/pdftotext- new file mode 100755 index 0000000..a52f8de --- /dev/null +++ b/bin/pdftotext- @@ -0,0 +1,21 @@ +#!/bin/sh + +# Run `pdftotext` but read input from stdin. + +# Copyright (C) 2011-2013 Simon Ruderich +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +exec pdftotext "$@" - diff --git a/bin/sqlite3dump b/bin/sqlite3dump new file mode 100755 index 0000000..d11a029 --- /dev/null +++ b/bin/sqlite3dump @@ -0,0 +1,23 @@ +#!/bin/sh + +# Create a SQL dump of a SQLite database. +# +# This is used to provide diffs of sqlite files when using Git. + +# Copyright (C) 2010-2013 Simon Ruderich +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +exec sqlite3 "$@" .dump diff --git a/gitconfig.m4 b/gitconfig.m4 index 7876a96..e361a07 100644 --- a/gitconfig.m4 +++ b/gitconfig.m4 @@ -169,9 +169,9 @@ include(../lib.m4) [diff "gzip"] textconv = gzip -d -c [diff "pdf"] - textconv = pdftotext- + textconv = PWD/bin/pdftotext- [diff "sqlite"] - textconv = sqlite3dump + textconv = PWD/bin/sqlite3dump [merge] IF(OS, darwin) -- 2.45.2