summaryrefslogtreecommitdiff
path: root/themes/compile_commands.sh
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-08-13 16:02:22 -0400
committermattkae <mattkae@protonmail.com>2023-08-13 16:02:22 -0400
commit056d4560f72a9ec281f8df31aa2a7d8241d6adf1 (patch)
treed0bcbe3ad5dd9e4efb662389b1aa6806cc4365ef /themes/compile_commands.sh
parentb6a666e96ffd04bd6d52be8fd9899faf27b751db (diff)
Generating a cpp file for shaders
Diffstat (limited to 'themes/compile_commands.sh')
-rwxr-xr-xthemes/compile_commands.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/themes/compile_commands.sh b/themes/compile_commands.sh
new file mode 100755
index 0000000..2cb3fed
--- /dev/null
+++ b/themes/compile_commands.sh
@@ -0,0 +1,5 @@
+make --always-make --dry-run \
+ | grep -wE 'gcc|g\+\+|c\+\+' \
+ | grep -w '\-c' \
+ | jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$").string[1:]}]' \
+ > compile_commands.json