diff options
author | John Wiegley <johnw@newartisans.com> | 2004-04-08 23:14:53 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-04-08 23:14:53 +0000 |
commit | 83b7a0ea9ca681893544c11160fc85e201da2937 (patch) | |
tree | 7f267f571bf113b07d7e6cd3874082aa11a5b5fd /entry | |
parent | 250248fd9e868e2afb7cd2b94506834d5542846b (diff) | |
download | fork-ledger-83b7a0ea9ca681893544c11160fc85e201da2937.tar.gz fork-ledger-83b7a0ea9ca681893544c11160fc85e201da2937.tar.bz2 fork-ledger-83b7a0ea9ca681893544c11160fc85e201da2937.zip |
Several small fixes.
Diffstat (limited to 'entry')
-rwxr-xr-x | entry | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#!/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 entry "$@" > /tmp/entry; then + cat /tmp/entry >> $LEDGER +else + echo "$@" >> $LEDGER +fi +rm /tmp/entry + +vi +$line $LEDGER |