diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-05 13:17:04 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-05 18:05:49 -0400 |
commit | f6f4a46cf5b14f9a2170cd6475958efbf320caec (patch) | |
tree | 05bc1defcdebc201de3dd10477483d906a842821 /contrib/scripts/entry | |
parent | b7970b29855563e4c67f85af8b31233eda80c22a (diff) | |
download | fork-ledger-f6f4a46cf5b14f9a2170cd6475958efbf320caec.tar.gz fork-ledger-f6f4a46cf5b14f9a2170cd6475958efbf320caec.tar.bz2 fork-ledger-f6f4a46cf5b14f9a2170cd6475958efbf320caec.zip |
Moved around most of the files so that source code is in src/, documentation
is in doc/, etc.
Diffstat (limited to 'contrib/scripts/entry')
-rwxr-xr-x | contrib/scripts/entry | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/scripts/entry b/contrib/scripts/entry new file mode 100755 index 00000000..cc030d8e --- /dev/null +++ b/contrib/scripts/entry @@ -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 |