aboutsummaryrefslogtreecommitdiffstats
path: root/bib-util
diff options
context:
space:
mode:
Diffstat (limited to 'bib-util')
-rwxr-xr-xbib-util28
1 files changed, 28 insertions, 0 deletions
diff --git a/bib-util b/bib-util
new file mode 100755
index 0000000..e807b03
--- /dev/null
+++ b/bib-util
@@ -0,0 +1,28 @@
+#!/bin/sh
+# bib-util - wrapper dispatching to the individual bibutils scripts
+#
+# usage: bib-util command [args ...]
+
+usage() {
+ printf 'usage: bib-util command [args ...]\n' >&2
+ printf 'commands: add check convert extract fetch gen key ls\n' >&2
+ exit 2
+}
+
+[ $# -ge 1 ] || usage
+cmd=$1
+shift
+
+dir=$(dirname "$0")
+case $cmd in
+ add|check|convert|extract|fetch|gen|key|ls)
+ exec "$dir/bib-$cmd" "$@"
+ ;;
+ help|-h|--help)
+ usage
+ ;;
+ *)
+ printf 'bib-util: unknown command: %s\n' "$cmd" >&2
+ usage
+ ;;
+esac