diff options
author | Leah Neukirchen <leah@vuxu.org> | 2018-02-08 19:50:27 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2018-02-08 19:50:27 +0100 |
commit | 29c7ad0e119b468343c8b096c3fd261769952387 (patch) | |
tree | 0bcc52b5e1bbd039b518b8b9f1e02e964df503b0 /xchroot | |
parent | 232f6ba03d250a829cf239712cc3208c4bec866d (diff) | |
download | xtools-29c7ad0e119b468343c8b096c3fd261769952387.tar.gz xtools-29c7ad0e119b468343c8b096c3fd261769952387.tar.xz xtools-29c7ad0e119b468343c8b096c3fd261769952387.zip |
xchroot: be a bit more verbose, and set PS1
Diffstat (limited to 'xchroot')
-rwxr-xr-x | xchroot | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xchroot b/xchroot index f70179d..2c68623 100755 --- a/xchroot +++ b/xchroot @@ -40,4 +40,10 @@ else INNER_SHELL="/bin/sh" fi -chroot "$CHROOT" ${@:-$INNER_SHELL} +printf "\033[1m=> Entering chroot $CHROOT\033[m\n" +export PS1="[xchroot $CHROOT] $PS1" +if chroot "$CHROOT" ${@:-$INNER_SHELL}; then + printf "\033[1m=> Exited chroot $CHROOT\033[m\n" +else + printf "\033[1m=> Exited chroot $CHROOT with status $?\033[m\n" +fi |