2 ms·
You can also use parentheses to create a scope for the current directory and environment variables (the shell forks a subprocess to run parenthesized commands).
by idupree 13y ago
You can also use parentheses to create a scope for the current directory and environment variables (the shell forks a subprocess to run parenthesized commands).
(cd /usr/ports/*/$PACKAGE ; sudo make install clean)
See http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_04 http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu...
- jonhohle 13y agoIn your example, however, the failure of `make install clean` will put you back in the original directory and not in the port's directory where you probably want to be to debug the failure. My original example keeps you in the port's directory in the event of installation failure.