From 9246ca5cca6f25080626eacb25c3f84f18cbc996 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Tue, 6 Sep 2022 07:42:45 -0600 Subject: [PATCH] deploy: use single character for displaying host status --- deploy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy b/deploy index 98ddfef..bfe6f13 100755 --- a/deploy +++ b/deploy @@ -45,10 +45,14 @@ if [ "$1" = "status" ]; then remote_rev=$(echo $host_data | jq -r .configurationRevision) remote_ver=$(echo $host_data | jq -r .nixosVersion) rev_msg="DIRTY" + rev_status="✓"; if [ "$remote_rev" != "DIRTY" ]; then rev_msg=$(git log --format=%B -n1 $remote_rev | head -n1) + if [ "${remote_rev}" != "${rev}" ]; then + rev_status="×" + fi fi - echo -e "\t\t${remote_ver}\t${remote_rev}\t(${rev_msg})" + echo -e "\t\t${remote_ver}\t${rev_status}\t(${rev_msg})" done exit 0 fi