18 lines
1.1 KiB
Bash
18 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# @file Emscripten Set-Up
|
|
# @brief Ensures the latest version of Emscripten is installed and activated
|
|
# @description
|
|
# This script installs and activates the latest version of Emscripten. This script
|
|
# implements the [instructions outlined on Emscripten's website](https://emscripten.org/docs/getting_started/downloads.html#installation-instructions-using-the-emsdk-recommended).
|
|
#
|
|
# This script will only run when `${XDG_DATA_HOME:-$HOME/.local/share}/emsdk` is present on the system. This folder
|
|
# is populated via the definition in `home/.chezmoiexternal.toml.tmpl`.
|
|
|
|
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/emsdk" ]; then
|
|
cd "${XDG_DATA_HOME:-$HOME/.local/share}/emsdk"
|
|
logg info 'Pulling latest changes for Emscripten source code'
|
|
git pull && logg success 'Successfully pulled latest Emscripten source code'
|
|
./emsdk install latest > /dev/null && logg success 'Installed latest Emscripten target'
|
|
./emsdk activate latest > /dev/null && logg success 'Activated latest Emscripten target'
|
|
logg info 'Profile source inclusions are already implemented in Bash / ZSH profile'
|
|
fi
|