adding basic mathemtaica setup

This commit is contained in:
2021-01-04 13:15:34 -06:00
commit 4f9d04c988
6 changed files with 119 additions and 0 deletions

30
do.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env sh
# Do - The Simplest Build Tool on Earth.
# Documentation and examples see https://github.com/8gears/do
# shellcheck disable=SC2039
set -Eeuo pipefail # -e "Automatic exit from bash shell script on error" -u "Treat unset variables and parameters as errors"
install() {
# shellcheck disable=SC2039
local install_loc
# shellcheck disable=SC2016
install_loc=$(wolframscript -c 'FileNameJoin[{StringReplace[$UserBaseDirectory, "\\" -> "/"], "Applications", "owenScalapinoFreeEnergy"}, OperatingSystem -> "Unix"]' | tr -d '\r\n')
echo "Installing to [$install_loc]"
mkdir -p "$install_loc"
echo $install_loc | hexdump
cp src/wl/owenScalapinoFreeEnergy.wl "$install_loc"
}
all() {
install
}
test() {
echo "I am ${FUNCNAME[0]}ing"
wolframscript -f src/wltest/RunTests.wls
}
"$@" # <- execute the task
[ "$#" -gt 0 ] || printf "Usage:\n\t./do.sh %s\n" "($(compgen -A function | grep '^[^_]' | paste -sd '|' -))"