The last commit did not contain the majority of changes because of a slight mishap. This contains the real changeset.
16 lines
283 B
Bash
Executable file
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
|