I enter a chroot, source a script to initialize my git user (source init_my_chroot
) and then seem to be too sensitive to getting kicked out of my chroot.
install: cannot create regular file ‘/path/to/testfile’: No such file or directory
make: *** [my-rule] Error 1
me@vm:~$
Is something calling exit
?
init_my_chroot
:
set -e
main() {
mount -t proc proc /proc || true
mount -t devpts none /dev/pts || true
git config alias.lg "log --oneline --decorate --all --graph"
eval $(ssh-agent -s) && ssh-add /root/.ssh/id_rsa
}
main "$@"
init_my_chroot
haveexit
orlogout
anywhere in it? e.g. if it detects thatmake
failed? – casey Sep 17 '15 at 20:18set -e
means that any command that gets an error triggers an exit. – Barmar Sep 17 '15 at 20:31