aboutsummaryrefslogtreecommitdiff
path: root/aux/prune-includes.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-14 09:33:56 -0300
committerEuAndreh <eu@euandre.org>2023-04-14 09:33:56 -0300
commite90d6bc34fdf8f590c92ffecacfc90cc3885611e (patch)
tree4c24dc9c4fdf72ed087c9e3e311479d13d9a667e /aux/prune-includes.sh
parentTODOs.md: Add #task-1554614f-2e33-616d-d021-70828dbf0381 (diff)
downloadgistatic-e90d6bc34fdf8f590c92ffecacfc90cc3885611e.tar.gz
gistatic-e90d6bc34fdf8f590c92ffecacfc90cc3885611e.tar.xz
rm -rf aux/
Diffstat (limited to '')
-rwxr-xr-xaux/prune-includes.sh24
1 files changed, 0 insertions, 24 deletions
diff --git a/aux/prune-includes.sh b/aux/prune-includes.sh
deleted file mode 100755
index 3a10fa2..0000000
--- a/aux/prune-includes.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-set -eu
-
-. aux/lib.sh
-
-prune() {
- file="$1"
- lines="$(grep -n '^#include ' "$file" | cut -d: -f1)"
- ORIG="$(mkstemp)"
- cp "$file" "$ORIG"
- for line in $lines; do
- sed "${line}d" "$ORIG" > "$file"
- if make -e; then
- prune "$file"
- break
- else
- cp "$ORIG" "$file"
- fi
- done
-}
-
-for f in "$@"; do
- prune "$f"
-done