install.fairie/home/.chezmoiscripts/universal/run_onchange_after_69-emsdk.sh.tmpl

20 lines
1.1 KiB
Cheetah
Raw Normal View History

2023-07-16 04:27:09 -07:00
#!/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`.
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
2023-07-16 04:27:09 -07:00
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/emsdk" ]; then
2023-11-29 22:13:23 -08:00
logg info 'Pulling latest changes for Emscripten source code' && git pull
logg info "Running emsdk install latest" && emsdk install latest > /dev/null
logg info "Running emsdk activate latest" && emsdk activate latest > /dev/null
2023-07-16 04:27:09 -07:00
logg info 'Profile source inclusions are already implemented in Bash / ZSH profile'
fi