* updated klines (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / scripts / Create-ParaStatus
blob3031a8ce984767fb2ce59a97befb3b17e505d800
1 #!/bin/bash
3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # This copyright note is auto-generated by scripts/Create-CopyPatch.
5 #
6 # T2 SDE: scripts/Create-ParaStatus
7 # Copyright (C) 2004 - 2020 The T2 SDE Project
8 # Copyright (C) 1998 - 2003 ROCK Linux Project
9 #
10 # More information can be found in the files COPYING and README.
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; version 2 of the License. A copy of the
15 # GNU General Public License can be found in the file COPYING.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 config=default
20 while [ "$1" ]; do
21 case "$1" in
22 -cfg) config=$2; shift; shift ;;
23 *) echo "Usage: $0 [ -cfg config ]"; exit 1 ;;
24 esac
25 done
27 . scripts/parse-config
28 qdir="$base/build/$SDECFG_ID/TOOLCHAIN/queue"
30 if [ ! -d $qdir ]; then
31 echo
32 echo "$qdir:"
33 echo "Queue not found! Please start 'Build-Target -cfg $config'"
34 echo "first on the master node ..."
35 echo
36 exit 1
39 date '+%H:%M %Y-%m-%d:%t--- current status ---' | expand -t20
40 cat $qdir/*.stat $qdir/*.lock 2> /dev/null | expand -t30
41 if [ -f $qdir/queue.txt ]; then
42 while read line; do
43 set $line; cat $qdir/$1-$6.todo 2> /dev/null
44 done < $qdir/queue.txt | expand -t30
45 else
46 echo -e 'Queue file not found!\tDisplaying' \
47 'all prepared jobs:' | expand -t30
48 cat $qdir/*.todo 2> /dev/null | sort -n -r -k9 | expand -t30
50 date '+%H:%M %Y-%m-%d:%t----------------------' | expand -t20