Skip to content

Commit

Permalink
Added --version option
Browse files Browse the repository at this point in the history
  • Loading branch information
mlafave committed Aug 22, 2014
1 parent 7243d10 commit ebcc5e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Or from a pipe:

samtools view file.bam | sam2pairwise > file.out

To display the current version and quit, enter:

sam2pairwise --version


Output
-------
Expand Down
9 changes: 7 additions & 2 deletions src/sam2pairwise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ using std::vector;



int main()
int main(int argc, char** argv)
{

if(argc == 2 && string(argv[1]) == "--version")
{
clog << "1.0.0" << endl;
return 0;
}

string input_string;
int pastheader = 0;


while ( getline( cin, input_string ) )
{

Expand Down

0 comments on commit ebcc5e1

Please sign in to comment.