Skip to content

Commit

Permalink
Added bin to composer.
Browse files Browse the repository at this point in the history
  • Loading branch information
alrik11es committed Feb 14, 2015
1 parent 0606b80 commit e624af1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/cowsayphp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env php
<?php
define('PATH', realpath(dirname(__FILE__)));
define('EXEC_PATH', getcwd());

include(PATH.'/../vendor/autoload.php');

if(count($argv) > 1){
$cow = new \League\Cowsayphp\Cow();
echo $cow->speak($argv[1]);
}
2 changes: 2 additions & 0 deletions bin/cowsayphp.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO off
php %~dp0/cowsayphp %*
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"bin": [
"bin/cowsayphp"
],
"config":{
"bin-dir": "bin"
}
}

0 comments on commit e624af1

Please sign in to comment.