summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-02-19 14:42:30 -0500
committerIan Moffett <ian@osmora.org>2025-02-19 14:42:30 -0500
commit7de7a252227fbc02b66c203a2c7984d38c5c77fd (patch)
treefa0cde968b436febb80102cab8aa29d677d03721 /tools
parent4d8fb95a920a96d4e2cef46587156d28540b2f1b (diff)
tools: contrib: Sort by most changes (++/--)
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/contrib5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/contrib b/tools/contrib
index 6d05052..34e9ac8 100755
--- a/tools/contrib
+++ b/tools/contrib
@@ -56,11 +56,12 @@ logstats() {
added=$(echo $stats | awk '{print $1}')
removed=$(echo $stats | awk '{print $2}')
+ sum=$((${added:-0}+ ${removed:-0}))
# If nothing changed, default to 0
added=${added:-0}
removed=${removed:-0}
- printf "%s [%s++/%s--]\n" "$line" "$added" "$removed"
+ printf "%s %s [%s++/%s--]\n" "$sum" "$line" "$added" "$removed"
done
}
@@ -71,5 +72,5 @@ git shortlog --summary --numbered --email | cut -c 7- | awk '{$1=$1;print}' | \
filter 'ian <ian>' | filter 'emilia' | sort -u | logstats &>$logfile
echo "----------------------------------"
-cat $logfile
+sort -nr $logfile | cut -d' ' -f2-
echo "----------------------------------"