3 ms·
I'm not about to move to FreeBSD, but I did just discover pushd and popd from this comment. Thanks!
by jon-wood 13y ago
I'm not about to move to FreeBSD, but I did just discover pushd and popd from this comment. Thanks!
- idupree 13y agoYou 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.