diff options
author | June McEnroe <june@causal.agency> | 2022-02-02 11:17:53 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-02-02 11:17:53 -0500 |
commit | b9c1bb6175dda782292c41db39ca8509c6dfce25 (patch) | |
tree | 2ae5872c10b2d60a20c3cc2ea5b0efd7bec4ceb7 | |
parent | Add ASCII diagram of keyboard layout (diff) | |
download | src-b9c1bb6175dda782292c41db39ca8509c6dfce25.tar.gz src-b9c1bb6175dda782292c41db39ca8509c6dfce25.zip |
Add whinclude
-rwxr-xr-x | home/.local/bin/whinclude | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/home/.local/bin/whinclude b/home/.local/bin/whinclude new file mode 100755 index 00000000..26445cdc --- /dev/null +++ b/home/.local/bin/whinclude @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +echo "#include <${1}>" | +cc ${CFLAGS:-} -E -x c - | +sed -En ' + /^# [0-9]+ "[^<]/{ + s/.*"([^"]+)".*/\1/p + q + } +' |