#!/usr/bin/env bash # # --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: scripts/Create-ParaStatus # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- config=default while [ "$1" ]; do case "$1" in -cfg) config=$2; shift; shift ;; *) echo "Usage: $0 [ -cfg config ]"; exit 1 ;; esac done . scripts/parse-config qdir="$base/build/$SDECFG_ID/TOOLCHAIN/queue" if [ ! -d $qdir ]; then echo echo "$qdir:" echo "Queue not found! Please start 'Build-Target -cfg $config'" echo "first on the master node ..." echo exit 1 fi date '+%H:%M %Y-%m-%d:%t--- current status ---' | expand -t20 cat $qdir/*.stat $qdir/*.lock 2> /dev/null | expand -t30 if [ -f $qdir/queue.txt ]; then while read line; do set $line; cat $qdir/$1-$6.todo 2> /dev/null done < $qdir/queue.txt | expand -t30 else echo -e 'Queue file not found!\tDisplaying' \ 'all prepared jobs:' | expand -t30 cat $qdir/*.todo 2> /dev/null | sort -n -r -k9 | expand -t30 fi date '+%H:%M %Y-%m-%d:%t----------------------' | expand -t20