Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Made zep binary again, added more structure to it.
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Jan 22, 2014
1 parent 00bcf96 commit b8ee48e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 22 deletions.
33 changes: 33 additions & 0 deletions bin/zep
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/php
<?php

// Require stuff
require(__DIR__ . '/../vendor/autoload.php');

$zep = new Zepto\Console($argv);

// Add parameter
$zep->param('option', 'Choose from init or new', true);

// Add options
$zep->option('-p, --plugin', 'Create new plugin');
$zep->option('-c, --content', 'Create new content');

if(!$zep->parse()) {
exit(1);
}

$input = $zep->getInputs();

if ($zep->get('option') === 'init') {
$zep->out('init');
// do init shit
}
elseif ($zep->get('option') === 'new') {
if (in_array(array('-p', '--plugin'), $input) && $input['-p'] === true) {
$zep->out('new plugin');
}
elseif (in_array(array('-c', '--content'), $input) && $input['-c'] === true) {
$zep->out('new content');
}
}
22 changes: 0 additions & 22 deletions zep.php

This file was deleted.

0 comments on commit b8ee48e

Please sign in to comment.