source: issm/trunk/externalpackages/emscripten/install.sh@ 26744

Last change on this file since 26744 was 26744, checked in by Mathieu Morlighem, 3 years ago

merged trunk-jpl and trunk for revision 26742

  • Property svn:executable set to *
File size: 1.0 KB
RevLine 
[20867]1#!/bin/bash
2set -eu
3
[22758]4
[24686]5# TODO:
6# - Introduce build step to $ISSM_DIR/jenkins/jenkins.sh to compile Fortran code in $ISSM_DIR/src/c/modules/GiaDefelectionCorex/ to C with f2c
[26744]7# - Then, revert $ISSM_DIR/externalpackages/emscripten/install.sh to r24306 and test clean build
8# - When builtin support for Fortran is available, remove build step
[24686]9#
10
[26744]11## Constants
12#
[24686]13VER="latest" # Set this to "latest", or last tag that works in case of failure
14
[26744]15## Environment
16#
17PREFIX="${ISSM_DIR}/externalpackages/emscripten/install"
[20867]18
[26744]19# Cleanup
20rm -rf ${PREFIX}
[20867]21
[26744]22# Get the emsdk repo
23git clone https://github.com/emscripten-core/emsdk.git
[20867]24
[26744]25# Create $PREFIX directory
26mkdir -p ${PREFIX}
27
28# Move source to $PREFIX directory
29mv emsdk/* ${PREFIX}
30rm -rf emsdk
31
32cd ${PREFIX}
33
[24313]34# Download and install the latest SDK tools.
[26744]35./emsdk install ${VER}
[20869]36
[24313]37# Make the "latest" SDK "active" for the current user. (writes ~/.emscripten
38# file)
[26744]39./emsdk activate ${VER}
[20870]40
[24313]41# Activate PATH and other environment variables in the current terminal
42source ./emsdk_env.sh
Note: See TracBrowser for help on using the repository browser.