summaryrefslogtreecommitdiff
path: root/contrib/repl.sh
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-04 20:52:40 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-04 20:52:40 -0400
commit066aef6090d5801e9e8452692c2478320dad48d3 (patch)
tree9c259218bc2c2d486cedbf10c5feb4ebeb822109 /contrib/repl.sh
parentf8ba4165fea63748d3f560bd16bc6c5c29ff2b3e (diff)
downloadfork-ledger-066aef6090d5801e9e8452692c2478320dad48d3.tar.gz
fork-ledger-066aef6090d5801e9e8452692c2478320dad48d3.tar.bz2
fork-ledger-066aef6090d5801e9e8452692c2478320dad48d3.zip
Added a repl.sh sample script to the contrib/ directory.
Diffstat (limited to 'contrib/repl.sh')
-rwxr-xr-xcontrib/repl.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/repl.sh b/contrib/repl.sh
new file mode 100755
index 00000000..42fb54c6
--- /dev/null
+++ b/contrib/repl.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+EXEC=$(which ledger)
+if [[ -z "$EXEC" ]]; then
+ EXEC=$HOME/Products/ledger/ledger
+fi
+
+if [[ ! -x "$EXEC" ]]; then
+ echo Cannot find Ledger executable
+ exit 1
+fi
+
+LESS=--quit-if-one-screen exec $EXEC --pager less "$@"