mirror of https://gerrit.osmocom.org/osmo-dev
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: I6c5b64e15d9a8dabaf65022d6b82b69523a3ca6bchanges/56/27456/1
parent
74e1584631
commit
641b4514f6
|
@ -171,6 +171,16 @@ kill_pids() {
|
|||
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 @@ set +e
|
|||
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"
|
||||
|
|
Loading…
Reference in New Issue