File: build-progress.sh

package info (click to toggle)
kde-dev-scripts 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,612 kB
  • sloc: perl: 15,615; lisp: 5,627; sh: 4,560; python: 3,892; ruby: 1,386; makefile: 13; sed: 9
file content (22 lines) | stat: -rw-r--r-- 648 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# This method gives some kind of status message in the title bar of Konsole,
# xterm, etc.. Thanks have to go to Malte Starostik
# <malte@kde.org> for the code :-)
set_title() {
if ([ "$TERM" = "xterm" ] || [ "$TERM" = "xterm-color" ] || [ "$TERM" = "screen" ]) && tty -s; then
  echo -ne "\033]0;$1\007"
fi
}
. ./kde-buildrc
set_title "Progress of kde-build script..."

cd $KDELOGDIR
while true; do 
    dir=`ls -t | head -n 1 | xargs grep "Entering directory" | tail -n 1 | awk "{print \\$4}" | sed "s'^$KDESRCDIR/''g"`
    set_title "Building $dir"
    clear
    grep -hi "time needed" *build* | \
	sed "s/\:T/ T/g"
    sleep 5
done;