diff options
author | Jonas Smedegaard <dr@jones.dk> | 2019-09-24 13:47:27 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2019-09-24 13:47:27 +0200 |
commit | 8d0a7a03b99f85002568a1b5c5db241a2cd7e1cc (patch) | |
tree | 69eeb9907128b85bf23a2c91263cde738275c20a /bin/myhledger | |
parent | 02388a648b278678bbdb43f8ad39cce908b61e1f (diff) |
Use include statements (not pipe).skat-2018
Diffstat (limited to 'bin/myhledger')
-rwxr-xr-x | bin/myhledger | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/bin/myhledger b/bin/myhledger index cf73eef..caa8cb3 100755 --- a/bin/myhledger +++ b/bin/myhledger @@ -15,22 +15,5 @@ set -e basedir="${basedir:-data}" -years="${years:-$(find "$basedir" -mindepth 1 -maxdepth 1 -type d -regex '.*/[0-9]+' -printf '%f\n')}" -journal() { - set -e - cd "$basedir" - for year in $years; do - cat defaults.ledger 2> /dev/null || true - cat $year/primo.ledger 2> /dev/null || true - cat defaults.ledger 2> /dev/null || true - cat $year/assets/*.ledger 2> /dev/null || true - cat defaults.ledger 2> /dev/null || true - cat $year/income/*.ledger 2> /dev/null || true - cat defaults.ledger 2> /dev/null || true - cat $year/expenses/*.ledger 2> /dev/null || true - cat $year/ultimo.ledger 2> /dev/null || true - done -} - -journal | hledger -f- "$@" +hledger -f "$basedir/journal.ledger" "$@" |