From b9c1bb6175dda782292c41db39ca8509c6dfce25 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 2 Feb 2022 11:17:53 -0500 Subject: Add whinclude --- home/.local/bin/whinclude | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 home/.local/bin/whinclude (limited to 'home') 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 + } +' -- cgit 1.4.1