From d3670965eaf950173c7d74b7fc498d8bd98e14f2 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 12 Mar 2020 07:48:15 +0100 Subject: Move all scripts under a new folder This folder will be used to hold all website-building code. At least until I change my mind and figure it's better to do it otherwise. --- update-count.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 update-count.sh (limited to 'update-count.sh') diff --git a/update-count.sh b/update-count.sh deleted file mode 100755 index d0a094e..0000000 --- a/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 -- cgit v1.2.3