adding basic mathemtaica setup
This commit is contained in:
30
do.sh
Normal file
30
do.sh
Normal 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 '|' -))"
|
||||
Reference in New Issue
Block a user