dotfiles/coverage
2016-03-16 15:59:01 +01:00

10 lines
361 B
Bash
Executable file

#!/bin/bash
DOTFILESINHOME=$(find ~/ -maxdepth 1 -type f -iname '.*rc' | wc -l)
DOTFILESINCONF=$(find ~/.config -maxdepth 1 -type d | wc -l)
SAVEDDOTFILES=$(ls -d ~/dotfiles | wc -l)
TOTALDOTFILES=$(echo "$DOTFILESINCONF + $DOTFILESINHOME" | bc -l)
PERC=$(echo "scale=2; $SAVEDDOTFILES / $TOTALDOTFILES" | bc -l)
echo "Coverage is (roughly) around ${PERC}%"