Re:FreeBSD 10′s New Technologies and Features
by jon-wood on Friday September 20, 2013 @12:23PM
(#6418703)
I'm not about to move to FreeBSD, but I did just discover pushd and popd from this comment. Thanks!
[ Parent
| on HN ]
Re:FreeBSD 10′s New Technologies and Features
by idupree on Friday September 20, 2013 @01:27PM
(#6419152)
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...
Re:FreeBSD 10′s New Technologies and Features
by jonhohle on Friday September 20, 2013 @02:11PM
(#6419472)
In 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.