summarylogtreecommitdiffstats
path: root/goledger
blob: 50cad42ae9ea9ea765a25c8125096cb6751bd6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

function print_help {
  echo -e "GoDBLedger - The Open Source Accounting System\n"
  echo "Usage:"
  echo -e "\t$0 verb [global options] sub-command [sub-command options] [arguments...]\n"
  echo "Supported Verbs:"
  echo -e "\tserver [s] Start GoDBLedger Database Server"
  echo -e "\treport [r] Extracts GL and TB reports from a GoDBLedger database"
  echo -e "\tclient [c] Command line for GoDBLedger gRPC"
}

args=("$@")
case "${args[0]}" in
  "server"|"s") unset args[0]; godbledger "${args[*]}" ;;
  "report"|"r") unset args[0]; reporter "${args[*]}" ;;
  "client"|"c") unset args[0]; ledger-cli "${args[*]}" ;;
  *) print_help ;;
esac