ledger/contrib/entry
John Wiegley 944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00

16 lines
283 B
Bash
Executable file

#!/bin/sh
if [ -z "$LEDGER" -o ! -r "$LEDGER" ]; then
echo Please set your LEDGER environment variable.
fi
line=`wc -l $LEDGER | awk '{print $1}'`
if ledger xact "$@" > /tmp/xact; then
cat /tmp/xact >> $LEDGER
else
echo "$@" >> $LEDGER
fi
rm /tmp/xact
vi +$line $LEDGER