summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Buchanan2021-06-18 14:14:41 -0600
committerNeal Buchanan2021-06-18 14:18:42 -0600
commit38a3bad3766c2fefac480928046e78bbce8d0df1 (patch)
tree6e73d4e80f84159edfd569ec3759f79663cfb556
parent439022e1eda0efb6a4797f856770071b81eb7725 (diff)
downloadaur-godbledger-bin.tar.gz
Create goledger wrapper script
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD4
-rwxr-xr-xgoledger19
3 files changed, 21 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f96382634541..c713d6ad4b20 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = godbledger-bin
pkgdesc = Accounting Software with GRPC endpoints and SQL Backends
pkgver = 0.6.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.godbledger.com
arch = x86_64
license = GPL3
diff --git a/PKGBUILD b/PKGBUILD
index 388f1d8744b5..1cdc9ab0f7fa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,5 @@ sha256sums=('bae9912c2a530607d6658717cc22aec59e0caa69166fa4df57955e8361f7d69c')
package() {
cd linux-amd64
- install -Dm755 reporter -t "${pkgdir}/usr/bin"
- install -Dm755 godbledger -t "${pkgdir}/usr/bin"
- install -Dm755 ledger-cli -t "${pkgdir}/usr/bin"
+ install -Dm755 -t "${pkgdir}/usr/bin" reporter godbledger ledger-cli ../../goledger
}
diff --git a/goledger b/goledger
new file mode 100755
index 000000000000..50cad42ae9ea
--- /dev/null
+++ b/goledger
@@ -0,0 +1,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