File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # DESCRIPTION #
4+
5+ # Script to run the stdlib `makie` utility.
6+
7+
8+ # VARIABLES #
9+
10+ # Define the command for `node`:
11+ export NODE=node
12+
13+ # Define the path to the `makie` executable:
14+ export MAKIE=` dirname " $0 " ` /../tools/misc/makie/bin/cli
15+
16+ # Define the path to the `makie` configuration file:
17+ export MAKIE_CONFIG=` dirname " $0 " ` /../etc/.makie.js
18+
19+ # Define the path to the Makefile directory:
20+ export MAKIE_MAKEFILE_DIR=` dirname " $0 " ` /../
21+
22+
23+ # FUNCTIONS #
24+
25+ # Defines an error handler.
26+ on_error () {
27+ echo ' ERROR: An error was encountered during execution.'
28+ cleanup
29+ exit 1
30+ }
31+
32+ # Runs clean-up tasks.
33+ cleanup () {
34+ echo ' '
35+ }
36+
37+
38+ # MAIN #
39+
40+ # Exit immediately if one of the executed commands exits with a non-zero status:
41+ set -e
42+
43+ # Set an error handler to print captured output and perform any clean-up tasks:
44+ trap ' on_error' ERR
45+
46+ # Run `makie`:
47+ $NODE " $MAKIE " " --config=$MAKIE_CONFIG " " --dir=$MAKIE_MAKEFILE_DIR " " $@ "
48+
49+ # Run cleanup tasks:
50+ cleanup
You can’t perform that action at this time.
0 commit comments