Skip to content

Commit

Permalink
Moves onCreateCommands to shell script for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
beriberikix authored and szczys committed Apr 16, 2024
1 parent fa4a1d5 commit 096e79b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"image": "golioth/golioth-zephyr-base:0.16.3-SDK-v0",
"workspaceMount": "source=${localWorkspaceFolder},target=/zephyr-training/app,type=bind",
"workspaceFolder": "/zephyr-training",
"onCreateCommand": "west init -l app && west update && west zephyr-export && pip install -r deps/zephyr/scripts/requirements.txt && echo \"alias ll='ls -lah'\" >> $HOME/.bashrc && west completion bash > $HOME/west-completion.bash && echo 'source $HOME/west-completion.bash' >> $HOME/.bashrc",
"remoteEnv": { "LC_ALL": "C" },
"onCreateCommand": "chmod +x app/.devcontainer/init.sh && app/.devcontainer/init.sh",
"remoteEnv": {
"LC_ALL": "C"
},
"customizations": {
"vscode": {
"settings": {
Expand All @@ -20,4 +22,4 @@
]
}
}
}
}
9 changes: 9 additions & 0 deletions .devcontainer/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

west init -l app
west update
west zephyr-export
pip install -r deps/zephyr/scripts/requirements.txt
echo \"alias ll='ls -lah'\" >> $HOME/.bashrc
west completion bash > $HOME/west-completion.bash
echo 'source $HOME/west-completion.bash' >> $HOME/.bashrc

0 comments on commit 096e79b

Please sign in to comment.