From 62ef64baa8c62d8d3b952a5eff5c1151213b35ac Mon Sep 17 00:00:00 2001 From: "Brent S. Sport" Date: Thu, 24 Jun 2021 07:25:39 +0200 Subject: [PATCH] added version command --- bin/toychain | 22 +++++++++++++++++++--- lib | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/bin/toychain b/bin/toychain index 207ed58..c83eb28 100755 --- a/bin/toychain +++ b/bin/toychain @@ -30,6 +30,7 @@ fi main() { case $what in init) tcinitialize $2;; + version) tcversion;; config) tcconfigure $@;; start) tcstart $2;; stop) tcstop $2;; @@ -77,12 +78,13 @@ tcupdate() { echo "$pgm: updating daemon with tag $tag..." top=$(git rev-parse --show-toplevel) echo // updating $top - git pull --ff-only origin master # 1> transcript.log 2>&1 + git pull --ff-only origin master 2>&1 | tee transcript.log echo // checking out $tag - git checkout $tag # 1> transcript.log 2>&1 + git checkout $tag 2>&1 | tee -a transcript.log + git log -1 cd $top/lib echo // updating $top/lib - git pull --ff-only origin master # 1> transcript.log 2>&1 + git pull --ff-only origin master 2>&1 | tee -a transcript.log git log -1 echo "---" } @@ -113,6 +115,20 @@ tcdebug() { echo "---" } +tcversion() { + top=$(git rev-parse --show-toplevel) + gitid0=$(git rev-parse --short HEAD) + git pull --ff-only origin master 1>> transcript.log 2>&1 + git checkout $tag 1>> transcript.log 2>&1 + gitid1=$(git rev-parse --short HEAD) + if [ "x$gitid0" != "x$gitid1" ]; then gitid1=$gitdi0-$gitid1; fi + cd $top/lib + git pull --ff-only origin master 1>> transcript.log 2>&1 + gitid2=$(git rev-parse --short HEAD) + echo Version: $gitid1-$gitid2 + +} + main $@; exit $?; diff --git a/lib b/lib index 0d8920d..84342cb 160000 --- a/lib +++ b/lib @@ -1 +1 @@ -Subproject commit 0d8920d1f5b431c583a1a23d230b8ad0b0675c5d +Subproject commit 84342cbab0833093c04a298d60429ad9556da3a1