Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from MikhailEpatko/emi/i1-configure-output-file…
…name Add output directory and output filename configuration
- Loading branch information
Showing
4 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/bin/bash | ||
|
||
if [ "$1" == '[]' ]; then Before="$(date +%F)"; else Before=$1; fi | ||
if [ "$2" == '[]' ]; then Dir='.'; else Dir=$2; fi | ||
if [ "$3" == '[]' ]; then Exclude=[]; else Exclude=$3; fi | ||
if [ "$4" == '[]' ]; then Since='2000-01-01'; else Since=$4; fi | ||
Dir=$2 | ||
Exclude=$3 | ||
Since=$4 | ||
OutDir=$5 | ||
Filename=$6 | ||
|
||
Count=$(hoc -d "$Dir" -e "$Exclude" -s "$Since" -b "$Before" -f 'int' ) | ||
Count=$(hoc -d "$Dir" -e "$Exclude" -s "$Since" -b "$Before" -f "int") | ||
echo "Hits of code: $Count" | ||
|
||
anybadge -l "Hits of Code" -v "$Count" -f ./output/hits.svg -c royalblue | ||
anybadge -l "Hits of Code" -v "$Count" -f "$OutDir/$Filename" -c royalblue |