Skip to content

Commit 035cc84

Browse files
Added help to setup-devcontainer cmd
1 parent a6af210 commit 035cc84

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

setup-devcontainer

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
#!/bin/bash
22

3+
setup_dir=$(pwd)/.vscode/setup
4+
35
case $1 in
4-
--install-ozone)
6+
-Z|--install-ozone)
57
curl -LO https://www.segger.com/downloads/jlink/Ozone_Linux_x86_64.deb
68
sudo bash -c 'add-apt-repository -y ppa:rock-core/qt4 && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libfreetype-dev libsm-dev libxrender-dev libxrandr-dev libxfixes-dev libxcursor-dev libfontconfig-dev libqtcore4'
79
sudo bash -c 'DEBIAN_FRONTEND=noninteractive apt-get install -y ./Ozone_Linux_x86_64.deb'
810
rm Ozone_Linux_x86_64.deb
911
;;
1012

11-
*)
12-
setup_dir=$(pwd)/.vscode/setup
13+
-h|--help)
14+
echo "Usage: setup-devcontainer [OPTION]"
15+
echo "Copy UDev rules or install additional features"
16+
echo ""
17+
echo "With no OPTION specified, the script will copy the UDev .rules files to $setup_dir."
18+
echo ""
19+
echo " -U, --install-udev Copies UDev rule files (default action)"
20+
echo " -Z, --install-ozone Downloads and installs SEGGER Ozone"
21+
echo " -h, --help Displays this help"
22+
;;
23+
24+
-U|--install-udev|"")
1325
mkdir -p $setup_dir
1426
cp /opt/SEGGER/JLink/99-jlink.rules $setup_dir/
1527
cp /opt/OpenOCD/openocd/contrib/60-openocd.rules $setup_dir/
1628
cp /opt/devcontainer/install-rules $setup_dir/
1729
;;
30+
31+
*)
32+
echo "setup-devcontainer: invalid option -- '$1'"
33+
echo "Try 'setup-devcontainer --help' for more information"
34+
;;
1835
esac

0 commit comments

Comments
 (0)