You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
349 B
15 lines
349 B
2 years ago
|
#!/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
|