diff options
author | Thomas Letan <lthms@soap.coffee> | 2022-08-13 19:59:45 +0200 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2022-08-13 19:59:45 +0200 |
commit | ef897c50ac9cd2c75c04fa3633de7ce6c012f69c (patch) | |
tree | 62b740e94a36f936f62db226466d3d6baabcf5e3 | |
parent | Provide a script to capture output of commands into files in 'logs/' (diff) |
Some tweaks to the toolchain
-rw-r--r-- | literate-programming.mk | 3 | ||||
-rwxr-xr-x | scripts/capture.sh | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/literate-programming.mk b/literate-programming.mk index 1e0ab16..1f158b6 100644 --- a/literate-programming.mk +++ b/literate-programming.mk @@ -1,4 +1,4 @@ -literate-programming-prebuild : org-prebuild +literate-programming-prebuild : site/posts/CoqffiEcho.org @scripts/pretty-echo.sh "Tangling" "literate programming project" @capture.sh tangling-lp ${EMACS} --eval "(cleopatra:export-lp)" @@ -13,7 +13,6 @@ coqffi-tutorial-build : literate-programming-prebuild _opam/init @rm -f ${COQFFI_ARCHIVE} @capture.sh coqffi-tutorial tar --exclude="_build" -C lp/ -czvf ${COQFFI_ARCHIVE} coqffi-tutorial -site/posts/CoqffiEcho.html : coqffi-tutorial-build literate-programming-build : coqffi-tutorial-build ARTIFACTS += ${COQFFI_ARCHIVE} diff --git a/scripts/capture.sh b/scripts/capture.sh index b21c3eb..f343cbb 100755 --- a/scripts/capture.sh +++ b/scripts/capture.sh @@ -8,6 +8,7 @@ shift 1 exitcode=$? if [[ ! ${exitcode} -eq 0 ]]; then - echo "An error occurred, see ${logfile}.stdout and ${logfile}.stderr" + echo -e "\033[0;31mError:\033[0m '"$@"' returned ${exitcode}" + echo -e "See \033[0;33m${logfile}.stdout\033[0m and \033[0;33m${logfile}.stderr\033[0m" exit ${exitcode} fi |