Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Add a tool to show the number of lines of code in a module
Browse files Browse the repository at this point in the history
  • Loading branch information
deanwilson committed Sep 26, 2017
1 parent 65ee389 commit 51185b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/puppet-code-by-module
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# This script sums the number of lines in all the manifest files
# contained in each module and then displays them.

for module in `ls modules | grep -v bouncer` # bouncer doesn't have any manifests
do
wc -l `find modules/$module -name "*.pp"` | tail -n 1 | awk -v mod="$module" '{ printf("%-40s %5s\n", mod, $1) }'
done | sort -rn -k 2

0 comments on commit 51185b8

Please sign in to comment.