tagomoris/xbuild — pull request #11 by nodakai (2014-08-06 12:26:47+00:00)
Title: Calling "exit" in a subshell won't work.

This is almost nitpicking...

08/06 20:16 [nodakai@kaidev01] /tmp/xbuild$ bash
nodakai@kaidev01:/tmp/xbuild$ ( cd /foobar ) || ( echo NG; exit 1 )
bash: cd: /foobar: そのようなファイルやディレクトリはありません
NG
nodakai@kaidev01:/tmp/xbuild$ if ! ( cd /foobar ); then echo NG; exit 1; fi
bash: cd: /foobar: そのようなファイルやディレクトリはありません
NG
exit
08/06 20:16 [nodakai@kaidev01] /tmp/xbuild$

The shortest fix would have been changing `( ... )` to `{ ... }`.
However curly-braces of Bash *sometimes* forks a subshell and are too confusing for this purpose.
(cf. http://unix.stackexchange.com/questions/127334/bash-subshell-creation-with-curly-braces )