#!/usr/bin/env php false, 'init' => false ]; foreach ($opts as $option=>$value) { switch ($option) { case 'h': case 'help': show_app_usage(); return false; case 'd': case 'dir': case 'directory': $parsed['dir'] = $value; break; case 'o': case 'output': $parsed['output'] = $value; break; case 'i': case 'install': $parsed['install'] = true; break; case 'I': case 'init': $parsed['init'] = true; } } return $parsed; } $opts = parse_opts(); if (false === $opts) { exit(1); } $path = getcwd(); $builder = new PharLite\Builder($path, $opts); if ($opts['init']) { $builder->initConfig(); } else { $builder->build(); }