-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_clangd.sh
executable file
·37 lines (34 loc) · 944 Bytes
/
start_clangd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
CONTAINER_NAME="$1"
PROJECT_ROOT_PATH="$2"
# "/tmp/PSX-Minecraft/>$PROJECT_ROOT_PATH/"
# read -d '' INIT_JSON << EOF || true
# {
# "clang": {
# "pathMappings": [
# "/tmp/PSX-Minecraft/>$PROJECT_ROOT_PATH/"
# ]
# },
# "compilationDatabaseDirectory": "$PROJECT_ROOT_PATH/build",
# "index": {
# "onChange": true
# }
# }
# EOF
docker run \
-i \
--rm \
-v"$PROJECT_ROOT_PATH:$PROJECT_ROOT_PATH" \
-w "$PROJECT_ROOT_PATH" \
-e PSN00BSDK_LIBS=/opt/psn00bsdk/lib/libpsn00b \
--name "$CONTAINER_NAME" \
psxmc:latest \
/bin/bash -c "ln -s $PROJECT_ROOT_PATH /tmp/PSX-Minecraft \
&& ln -s $PROJECT_ROOT_PATH/.clangd /opt/psn00bsdk/include/libpsn00b/.clangd \
&& /usr/bin/clangd \
--compile-commands-dir=\"${PROJECT_ROOT_PATH}/build\" \
--background-index"
# --log=verbose"
# /usr/bin/ccls \
# --init="$INIT_JSON" \
# -v=2