From 86cbe0b0958889edbd041f43453306371cdd0b40 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 3 Sep 2017 12:12:02 -0700 Subject: [PATCH] install: show some system info --- hledger-install/hledger-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hledger-install/hledger-install.sh b/hledger-install/hledger-install.sh index 55eb3d3ce..1f1ed0515 100755 --- a/hledger-install/hledger-install.sh +++ b/hledger-install/hledger-install.sh @@ -770,6 +770,11 @@ try_info() { $@ } +# Run a command if possible, suppressing any error output or non-zero exit code. +quietly_run() { + $@ 2>/dev/null || true +} + # start # process command-line flags @@ -839,6 +844,11 @@ if ! on_path "$HOME_LOCAL_BIN" ; then export PATH=$HOME_LOCAL_BIN:$PATH fi +# show system info +echo "System info:" +quietly_run uname +quietly_run lsb_release -a + # show current installed hledger packages echo "Install status:" print_hledger_versions