osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-dev/+/27456 )
Change subject: net/templates/run: log name input: display last
......................................................................
net/templates/run: log name input: display last
Make it easier for the user to follow a consistent naming scheme for the
log files if they want do do so, by displaying the last log name.
enter name to save log (last: 2022-03-07_04-test-log-name):
Change-Id: I6c5b64e15d9a8dabaf65022d6b82b69523a3ca6b
---
M net/templates/run.sh
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/56/27456/1
diff --git a/net/templates/run.sh b/net/templates/run.sh
index 3165f53..1b4bcdd 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -171,6 +171,16 @@
done
}
+read_log_name() {
+ log_name_last="$(ls -Art "log" | tail -n1)"
+ if [ -n "$log_name_last" ]; then
+ log_name_last=" (last: $log_name_last)"
+ fi
+
+ echo "enter name to save log$log_name_last:"
+ read log_name
+}
+
find_term
kill_pids
@@ -309,8 +319,7 @@
cp *.cfg "$logdir"/
echo
-echo enter name to save log
-read log_name
+read_log_name
if [ -n "$log_name" ]; then
newlogdir="log/$log_name"
#scp "bts:/tmp/{bts,pcu}.log" "bts:neels/osmo-{bts,pcu}.cfg"
"$logdir"
--
To view, visit
https://gerrit.osmocom.org/c/osmo-dev/+/27456
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I6c5b64e15d9a8dabaf65022d6b82b69523a3ca6b
Gerrit-Change-Number: 27456
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange