From 8ce8b3857c611424be13c421f22c15d3ba6d62c2 Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Tue, 26 Jul 2022 21:53:57 -0700 Subject: [PATCH] Add reconcile command helper --- .env | 3 ++- bin/reconcile | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) mode change 100644 => 100755 bin/reconcile diff --git a/.env b/.env index 12819d8..d3f5b02 100644 --- a/.env +++ b/.env @@ -1,5 +1,6 @@ # The parent folder containing configuration data for the various apps. -CONFIG_DIR=config +# This must be an absolute path. +CONFIG_DIR=/home/my-username/metaledger/config # The parent folder containing your ledger files. # This must be an absolute path. diff --git a/bin/reconcile b/bin/reconcile old mode 100644 new mode 100755 index 151adfd..61b2c42 --- a/bin/reconcile +++ b/bin/reconcile @@ -1,3 +1,11 @@ #!/bin/bash -echo TODO +if [ ${#} -ne 1 ]; then + echo "Must provide an account name to reconcile." + echo "Usage: ${0} account_name" + exit 1 +fi + +SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" + +${SCRIPTPATH}/ledgerbil --reconcile ${1}