mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-06 17:03:17 +00:00
Update devcontainer startup to consistently chown passed-thru usb devices
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
"postCreateCommand": "bash scripts/install-toolchain.sh",
|
"postCreateCommand": "bash scripts/install-toolchain.sh",
|
||||||
|
"postAttachCommand": "bash scripts/chown-usb.sh",
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
|
|||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
if [[ -c /dev/ttyUSB0 ]]; then
|
||||||
|
sudo chown root:$(id -gn $(whoami)) /dev/ttyUSB0
|
||||||
|
fi
|
||||||
|
if [[ -c /dev/ttyUSB1 ]]; then
|
||||||
|
sudo chown root:$(id -gn $(whoami)) /dev/ttyUSB1
|
||||||
|
fi
|
||||||
@@ -1,7 +1,2 @@
|
|||||||
sudo apk add make cmake avrdude avr-libc gcc-avr
|
sudo apk add make cmake avrdude avr-libc gcc-avr
|
||||||
if [[ -c /dev/ttyUSB0 ]]; then
|
|
||||||
sudo chown root:$(id -gn $(whoami)) /dev/ttyUSB0
|
|
||||||
fi
|
|
||||||
if [[ -c /dev/ttyUSB1 ]]; then
|
|
||||||
sudo chown root:$(id -gn $(whoami)) /dev/ttyUSB1
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user