aboutsummaryrefslogtreecommitdiff
path: root/plugins/readability/recompute_READABILITY_N.sh
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-04-21 19:19:11 -0400
committerNunoSempere <nuno.sempere@protonmail.com>2023-04-21 19:19:11 -0400
commitb129954d4d2f3fcc176f3bea96110e9dfd188bd5 (patch)
tree8092e2a59adbefdb692c278462aaeba5ce6a4bb0 /plugins/readability/recompute_READABILITY_N.sh
parentb32749aa6e495aedc286e9537a4ee664c467919c (diff)
feat: improve compilation a bit.
- tcc -> gcc (noticeably faster compilation)
Diffstat (limited to 'plugins/readability/recompute_READABILITY_N.sh')
-rwxr-xr-xplugins/readability/recompute_READABILITY_N.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/readability/recompute_READABILITY_N.sh b/plugins/readability/recompute_READABILITY_N.sh
index 85d3352..2e4fc91 100755
--- a/plugins/readability/recompute_READABILITY_N.sh
+++ b/plugins/readability/recompute_READABILITY_N.sh
@@ -1,8 +1,9 @@
-#!/bin/bash
-function sedr(){
+#!/bin/sh
+sed_wrapper()
+{
find ./ -type f -exec sed -i -e "$1" {} \;
} ## e.g., sedr "s/target/replacement/g"
-READABILITY_N=$(wc -c readability.js | cut -d " " -f 1)
-sedr "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1000/g"
+READABILITY_N=`wc -c readability.js | cut -d " " -f 1`
+sed_wrapper "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1000/g"