Smarter Bash Scripts
Recently I was looking at my blog, working on some design changes and I was on this article. I noticed that I wrote a small shell script for initializing Composer with the HHVM.
The script I provided looked something like this:
#!/usr/bin/env bash hhvm /usr/local/bin/composer $@
I noticed that I can make this a bit more portable. Notably, I am calling where I put the Composer .phar
file explicitly in my file system. This may not be where you have it.
#!/usr/bin/env bash COMPOSER=`which composer` hhvm $COMPOSER $@
There, now it should work in more places.