From db40fbad598b6f84472cb2921df89f1a46fc6b5c Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Fri, 9 Oct 2020 17:49:42 -0700 Subject: Conditionally source zephyr-env.sh in .bashrc --- .devcontainer/.bashrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .devcontainer/.bashrc (limited to '.devcontainer/.bashrc') diff --git a/.devcontainer/.bashrc b/.devcontainer/.bashrc new file mode 100644 index 0000000..6a6ea69 --- /dev/null +++ b/.devcontainer/.bashrc @@ -0,0 +1,6 @@ +export LS_OPTIONS='-F --color=auto' +eval "`dircolors`" +alias ls='ls $LS_OPTIONS' +if [ -f /workspaces/zmk/zephyr/zephyr-env.sh ]; then + source /workspaces/zmk/zephyr/zephyr-env.sh +fi -- cgit v1.2.3 From 63ad5b7c089f13a5b5d5514514cc9ad7e798d3e8 Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Sat, 10 Oct 2020 01:42:50 +0000 Subject: Inject $WORKSPACE_DIR into container This permits users to check ZMK out into arbitrarily-named directories --- .devcontainer/.bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.devcontainer/.bashrc') diff --git a/.devcontainer/.bashrc b/.devcontainer/.bashrc index 6a6ea69..855ea75 100644 --- a/.devcontainer/.bashrc +++ b/.devcontainer/.bashrc @@ -1,6 +1,6 @@ export LS_OPTIONS='-F --color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' -if [ -f /workspaces/zmk/zephyr/zephyr-env.sh ]; then - source /workspaces/zmk/zephyr/zephyr-env.sh +if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then + source "$WORKSPACE_DIR/zephyr/zephyr-env.sh" fi -- cgit v1.2.3