File indexing completed on 2024-04-28 09:37:08

0001 #!/bin/sh
0002 
0003 # This method gives some kind of status message in the title bar of Konsole,
0004 # xterm, etc.. Thanks have to go to Malte Starostik
0005 # <malte@kde.org> for the code :-)
0006 set_title() {
0007 if ([ "$TERM" = "xterm" ] || [ "$TERM" = "xterm-color" ] || [ "$TERM" = "screen" ]) && tty -s; then
0008   echo -ne "\033]0;$1\007"
0009 fi
0010 }
0011 . ./kde-buildrc
0012 set_title "Progress of kde-build script..."
0013 
0014 cd $KDELOGDIR
0015 while true; do 
0016     dir=`ls -t | head -n 1 | xargs grep "Entering directory" | tail -n 1 | awk "{print \\$4}" | sed "s'^$KDESRCDIR/''g"`
0017     set_title "Building $dir"
0018     clear
0019     grep -hi "time needed" *build* | \
0020         sed "s/\:T/ T/g"
0021     sleep 5
0022 done;