dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 2146ea8bbf72003573d019e13f524335c21c85cc
parent 7a4a5a5abb0583a9571faea2da853aa0cec8f50e
Author: Chris Bracken <chris@bracken.jp>
Date:   Mon, 26 Aug 2024 22:38:35 -0700

bin: add embedder command

Command for incredibly lazy people to set the compile_commands.json
symlink at the root of their Flutter engine repo, such that their editor
of choice is happy.

Diffstat:
A.local/bin/embedder | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/.local/bin/embedder b/.local/bin/embedder @@ -0,0 +1,20 @@ +#!/bin/sh + +# Sets the compile_commands.json symlink at the root of the Flutter engine +# repo, to one from the debug unopt build directory for the specified OS. +# Useful for letting your editor know which embedder/engine configuration you'd +# like clangd analysis for. + +COMPILE_COMMANDS="$HOME/Developer/flutter/engine/src/compile_commands.json" + +OS=$1 +case $OS in + ios) + rm -f "$COMPILE_COMMANDS" + ln -s out/ios_debug_unopt/compile_commands.json "$COMPILE_COMMANDS" + ;; + macos) + rm -f "$COMPILE_COMMANDS" + ln -s out/host_debug_unopt_arm64/compile_commands.json "$COMPILE_COMMANDS" + ;; +esac