Refresh the devcontainer

With the latest optimizations from upstream.
This commit is contained in:
Felipe Santos
2022-07-06 00:19:42 -03:00
parent 848436eaef
commit 6917dd98b3
4 changed files with 13 additions and 18 deletions
+9
View File
@@ -8,8 +8,17 @@
"41000": {
"label": "Rollup",
"onAutoForward": "silent"
},
"hass:8123": {
"label": "Home Assistant",
"onAutoForward": "silent"
},
"frigate:5000": {
"label": "Frigate",
"onAutoForward": "silent"
}
},
"forwardPorts": ["hass:8123", "frigate:5000"],
"initializeCommand": ".devcontainer/initialize.sh",
"postCreateCommand": "yarn install",
"extensions": [
+3 -14
View File
@@ -1,18 +1,7 @@
#!/bin/bash
set -euo pipefail
readonly wanted_line_key="LOCAL_WORKSPACE_FOLDER"
readonly wanted_line="${wanted_line_key}='${PWD}'"
readonly file=".env"
echo "Writing ${wanted_line} to ${file}" >&2
if [[ -f "${file}" ]] && grep --quiet "^${wanted_line_key}=" "${file}"; then
sed --in-place "s,^${wanted_line_key}=.*,${wanted_line}," "${file}"
else
echo "${wanted_line}" >>"${file}"
fi
set -x
set -euxo pipefail
git submodule update --init
.devcontainer/frigate-hass-integration/.devcontainer/set_dot_env.sh