2023-09-16 05:00:24 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-09-30 08:45:06 +08:00
|
|
|
source .devcontainer/.host/.env
|
|
|
|
|
2023-09-16 05:00:24 +08:00
|
|
|
# setup safe directories for submodules
|
|
|
|
SUBMODULE_DIRS=$(git config --file .gitmodules --get-regexp path | awk '{ print $2 }')
|
|
|
|
for DIR in $SUBMODULE_DIRS; do
|
|
|
|
git config --global --add safe.directory "$PWD/$DIR"
|
|
|
|
done
|
2023-09-30 08:45:06 +08:00
|
|
|
|
|
|
|
# virtual display for virtualgl
|
|
|
|
if [[ "$HOST_OS" == "darwin" ]] && [[ -n "$HOST_DISPLAY" ]]; then
|
|
|
|
echo "Starting virtual display at :99 ..."
|
|
|
|
tmux new-session -d -s fakedisplay Xvfb :99 -screen 0 1920x1080x24
|
|
|
|
fi
|