Skip to content

Commit

Permalink
Refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Epatko committed Mar 3, 2024
1 parent d6f52ae commit 560278b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions generate-badge.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/bin/bash

echo "|| $1 || $2 || $3 || $4 ||"
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

Count=$(hoc -d "$Dir" -e "$Exclude" -s "$Since" -b "$Before" -f 'int' )
echo "Hits of code: $Count "
echo "Hits of code: $Count"

anybadge -l "Hits of Code" -v "$Count" -f ./output/hits.svg -c royalblue

0 comments on commit 560278b

Please sign in to comment.