Fix emsdk_env.sh for multiple shells (#594)

This change allows sourcing emsdk_env.sh from bash, zsh and
ksh.

The script works out the true location of the emsdk directory,
even if it is a symlink or the script itself is a symlink.

Added a test in scripts/test_source_env.sh to try sourcing via
all the shells and with various paths.

Co-authored-by: Bob Tolbert <bob@tolbert.org>
This commit is contained in:
Bob Tolbert
2020-08-22 12:31:16 -06:00
committed by GitHub
parent 721ef8f476
commit c1f0ad9fcd
3 changed files with 189 additions and 11 deletions

View File

@@ -34,8 +34,9 @@ jobs:
- checkout
- run:
name: Install debian packages
command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless
command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless ksh zsh
- run: scripts/test.sh
- run: scripts/test_source_env.sh
- run:
name: test.py
command: |