summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/enter_dev_chroot.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/enter_dev_chroot.sh b/templates/enter_dev_chroot.sh
index 1e3160c..a2a6d85 100755
--- a/templates/enter_dev_chroot.sh
+++ b/templates/enter_dev_chroot.sh
@@ -30,6 +30,12 @@ Modify() { # $1 is + for up and - for down.
) 200>$LOCKFILE
}
#-----------------------------------------------------------------------#
+# set the title bar for an xterm or Konsole.
+title() { # args are the title
+ echo -en "\e]0;$@\a" # for xterm,
+ echo -en "\e]30;$@\a" # for Konsole.
+}
+#-----------------------------------------------------------------------#
# check if a filesystem/directory is already mounted & if not, mount it.
# ckMount -t <fstype> <mntDir>
# ckMount --bind <srcDir> <dstDir>
@@ -47,8 +53,7 @@ ckMount() { # $1= -t|--bind, $2= fstype|srcDir $3= mntDir|dstDir
# if this is the last incident, unmount all.
cleanUp() { # no arguments
# mark the exit to normal operation:
- echo -en "\e]0;Normal\a" # for xterm,
- echo -en "\e]30;Normal\a" # for Konsole.
+ title Normal
V=$(Modify -)
[ "$V" -ne "0" ] && exit 0
@@ -131,8 +136,7 @@ ckMount --bind $repoBaseDir data/$repoBaseDir
copyIn
# change the titlebar to indicate chroot:
-echo -e "\e]0;CHROOT : $ARCH\a" # for xterm,
-echo -e "\e]30;CHROOT : $ARCH\a" # for Konsole.
+title "CHROOT : $ARCH"
# The actual chroot:
env -i TERM="$TERM" DISPLAY="$DISPLAY" /usr/sbin/chroot . /bin/bash --login