Skip to content

Instantly share code, notes, and snippets.

@nojimage
Created June 4, 2014 11:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nojimage/5ff1d2069fa4015b5d48 to your computer and use it in GitHub Desktop.
Save nojimage/5ff1d2069fa4015b5d48 to your computer and use it in GitHub Desktop.
php-timecop を phpenv環境に一気にインストールしちゃうぜ。的な
for v in $(phpenv versions | cut -c 3-8);
do
phpenv local $v && php --ri timecop || (phpize && make clean && ./configure && make && make install)
if [ -f $(php-config --extension-dir)/timecop.so ] ; then
inifile=$(php --ini | grep "Scan for additional .ini files" | cut -d : -f 2)/timecop.ini
test -f $inifile || echo "extension=timecop.so" > $inifile
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment