summaryrefslogtreecommitdiff
path: root/scripts/update-count.sh
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-12 22:40:41 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-12 22:40:41 +0100
commit9dfca25455dbac7fad721bac44daa9d9a149475a (patch)
tree3fca1408fc63a679486365f7f2c12c7be590c110 /scripts/update-count.sh
parentd1ae8a072d5de600d24409ed1c02c6fdf95b566c (diff)
downloadmemory-leaks-9dfca25455dbac7fad721bac44daa9d9a149475a.tar.xz
Make hooks easier to setup & maintain
By giving them meaningful names and adding a master script to call them all.
Diffstat (limited to 'scripts/update-count.sh')
-rwxr-xr-xscripts/update-count.sh29
1 files changed, 0 insertions, 29 deletions
diff --git a/scripts/update-count.sh b/scripts/update-count.sh
deleted file mode 100755
index d0a094e..0000000
--- a/scripts/update-count.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-list-tracked ()
-{
- GIT_LITERAL_PATHSPECS='' git ls-files '*.md' '*.org'
-}
-
-count-leaks ()
-{
- let pages=0
- let words=0
-
- while read filename
- do
- let words+=$(git show HEAD:${filename} | wc -w | cut -d' ' -f1)
- let pages+=1
- done
-
- echo ${words} ${pages}
-}
-
-
-
-read words pages < <(list-tracked | count-leaks)
-
-pattern="[0-9]* words in [0-9]* pages"
-actual="${words} words in ${pages} pages"
-
-sed -i "s/${pattern}/${actual}/" README.md