kenirwin / Weeding-Helper

Web-based software to help libraries make weeding/de-accession decision. Designed for libraries using III (Innovative Interfaces) catalogs.
Other
11 stars 3 forks source link

use env in hashbang line instead of explicit path to php #3

Closed phette23 closed 9 years ago

phette23 commented 9 years ago

Rather than specify the exact path to PHP in the hashbang line of innreach_check.php and prep_file.php, the env utility can locate it in a cross-platform way. So even if PHP is installed in /usr/local, users won't need to update these files with a different path because env will find them.

This simplifies set up a bit, allowing the removal of one <li> from documentation.php. I see mixed information on the web on whether or not various env implementations can pass flags to the target programs, so if the -e flag is really necessary in innreach_check.php you'd want to test further or consider not using env. I can tell everything works on my OS X laptop but I haven't tested on our Ubuntu servers yet.

kenirwin commented 9 years ago

That's a great trick -- I didn't know it.