Commit b89cd095 authored by Linux User's avatar Linux User

set xterm window title

parent 83273660
...@@ -58,8 +58,19 @@ error() { ...@@ -58,8 +58,19 @@ error() {
printf "${prompt} ${fake}${name}: $@\n" >&2 printf "${prompt} ${fake}${name}: $@\n" >&2
} }
set_xterm_title() {
if [ "$TERM" = xterm ]; then
printf "\033]0;$1\007"
fi
}
cleanup() {
set_xterm_title ""
}
die() { die() {
error "$@" error "$@"
cleanup
exit 1 exit 1
} }
...@@ -457,8 +468,7 @@ if [ -n "$subpkgname" ]; then ...@@ -457,8 +468,7 @@ if [ -n "$subpkgname" ]; then
fi fi
trap 'die "Aborted by user"' INT trap 'die "Aborted by user"' INT
set_xterm_title "abuild: $pkgname"
[ -n "$forceunpack" ] && rm -f "$srcdir"/.unpack
if [ -z "$1" ]; then if [ -z "$1" ]; then
...@@ -473,4 +483,5 @@ while [ $# -gt 0 ]; do ...@@ -473,4 +483,5 @@ while [ $# -gt 0 ]; do
runpart $1 runpart $1
shift shift
done done
cleanup
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment