Skip to content

Commit

Permalink
devcontainer: rename init.sh to onCreateCommand.sh
Browse files Browse the repository at this point in the history
- Rename init.sh to onCreateCommand.sh
- use interactive bash shell to run script
- fix quotes in script
- erase history so it doesn't appear on constainer terminal when pressing
  up arrow

Signed-off-by: Mike Szczys <[email protected]>
  • Loading branch information
szczys committed Apr 16, 2024
1 parent 8ba1ad5 commit b2795cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"image": "golioth/golioth-zephyr-base:0.16.3-SDK-v0",
"workspaceMount": "source=${localWorkspaceFolder},target=/zephyr-training/app,type=bind",
"workspaceFolder": "/zephyr-training",
"onCreateCommand": "chmod +x app/.devcontainer/init.sh && app/.devcontainer/init.sh",
"remoteEnv": {
"LC_ALL": "C"
},
"onCreateCommand": "bash -i /zephyr-training/app/.devcontainer/onCreateCommand.sh",
"remoteEnv": { "LC_ALL": "C" },
"customizations": {
"vscode": {
"settings": {
Expand All @@ -22,4 +20,4 @@
]
}
}
}
}
5 changes: 3 additions & 2 deletions .devcontainer/init.sh → .devcontainer/onCreateCommand.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ west init -l app
west update
west zephyr-export
pip install -r deps/zephyr/scripts/requirements.txt
echo \"alias ll='ls -lah'\" >> $HOME/.bashrc
echo "alias ll='ls -lah'" >> $HOME/.bashrc
west completion bash > $HOME/west-completion.bash
echo 'source $HOME/west-completion.bash' >> $HOME/.bashrc
echo 'source $HOME/west-completion.bash' >> $HOME/.bashrc
history -c

0 comments on commit b2795cd

Please sign in to comment.