mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 10:03:55 +08:00
* export host config via .host/.env file. fix mac display issues
* append instead of replace for bashrc
* Log when mac display override happens
* Update xauthority path in json
old-commit-hash: dd26a1faad
15 lines
349 B
Bash
Executable File
15 lines
349 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source .devcontainer/.host/.env
|
|
|
|
# override display flag for mac
|
|
if [[ $HOST_OS == darwin ]]; then
|
|
echo "Setting up DISPLAY override for macOS..."
|
|
cat <<EOF >> /root/.bashrc
|
|
if [ -n "\$DISPLAY" ]; then
|
|
DISPLAY_NUM=\$(echo "\$DISPLAY" | awk -F: '{print \$NF}')
|
|
export DISPLAY=host.docker.internal:\$DISPLAY_NUM
|
|
fi
|
|
EOF
|
|
fi
|