aboutsummaryrefslogtreecommitdiff
path: root/scripts/compiledb-full-path-mingw.sh
blob: be45ca76145853cc079a2c956a2cdd96aea4b001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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"