mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-20 21:46:57 +00:00
set xterm window title
This commit is contained in:
parent
83273660a8
commit
b89cd09513
15
abuild
15
abuild
@ -58,8 +58,19 @@ error() {
|
||||
printf "${prompt} ${fake}${name}: $@\n" >&2
|
||||
}
|
||||
|
||||
set_xterm_title() {
|
||||
if [ "$TERM" = xterm ]; then
|
||||
printf "\033]0;$1\007"
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
set_xterm_title ""
|
||||
}
|
||||
|
||||
die() {
|
||||
error "$@"
|
||||
cleanup
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -457,8 +468,7 @@ if [ -n "$subpkgname" ]; then
|
||||
fi
|
||||
|
||||
trap 'die "Aborted by user"' INT
|
||||
|
||||
[ -n "$forceunpack" ] && rm -f "$srcdir"/.unpack
|
||||
set_xterm_title "abuild: $pkgname"
|
||||
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
@ -473,4 +483,5 @@ while [ $# -gt 0 ]; do
|
||||
runpart $1
|
||||
shift
|
||||
done
|
||||
cleanup
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user