|
#!/bin/bash
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
#
|
|
# Filename: scripts/Create-ParaStatus
|
|
# Copyright (C) 2006 The OpenSDE Project
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
# Copyright (C) 1998 - 2003 Clifford Wolf
|
|
#
|
|
# 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 as published by
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
# GNU General Public License can be found in the file COPYING.
|
|
# --- SDE-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
|
|
|
|
. lib/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
|
|
|