aboutsummaryrefslogtreecommitdiff
path: root/scripts/compiledb-full-path-mingw.sh
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-02-02 16:39:13 +0100
committerlonkaars <loek@pipeframe.xyz>2023-02-02 16:39:13 +0100
commit53a00c212061f44ed49a727f13b3923fb3b4d04a (patch)
tree7bccf7025456d772bcaecd7ca2ec0ad87d66bb80 /scripts/compiledb-full-path-mingw.sh
initial commit
Diffstat (limited to 'scripts/compiledb-full-path-mingw.sh')
-rwxr-xr-xscripts/compiledb-full-path-mingw.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/compiledb-full-path-mingw.sh b/scripts/compiledb-full-path-mingw.sh
new file mode 100755
index 0000000..be45ca7
--- /dev/null
+++ b/scripts/compiledb-full-path-mingw.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+[ `uname -o` != "Msys" ] && exit
+
+COMPILEDB_FILE="$1"
+
+fixpath () {
+ NEW="C:/msys64`which $1`.exe"
+ sed "s#\"$1\",#\"$NEW\",#g" -i "$COMPILEDB_FILE"
+}
+
+fixpath arm-none-eabi-gcc
+fixpath arm-none-eabi-objcopy
+sed 's#"/\(.\)/#"\U\1:/#g' -i "$COMPILEDB_FILE" \ No newline at end of file