From 021ec1aa9418b2bf860b36fe77efa05f4ea17f0b Mon Sep 17 00:00:00 2001 From: Hydrazer Date: Thu, 30 Dec 2021 11:12:20 -0700 Subject: [PATCH] pkg(MATL-22.5.0): added MATL 22.5.0 --- packages/MATL/22.5.0/build.sh | 9 +++++++++ packages/MATL/22.5.0/environment | 5 +++++ packages/MATL/22.5.0/metadata.json | 5 +++++ packages/MATL/22.5.0/run | 13 +++++++++++++ packages/MATL/22.5.0/test.matl | 1 + readme.md | 1 + 6 files changed, 34 insertions(+) create mode 100644 packages/MATL/22.5.0/build.sh create mode 100644 packages/MATL/22.5.0/environment create mode 100644 packages/MATL/22.5.0/metadata.json create mode 100644 packages/MATL/22.5.0/run create mode 100644 packages/MATL/22.5.0/test.matl diff --git a/packages/MATL/22.5.0/build.sh b/packages/MATL/22.5.0/build.sh new file mode 100644 index 0000000..ea2a376 --- /dev/null +++ b/packages/MATL/22.5.0/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# build octave as dependency +source ../../octave/6.2.0/build.sh + +# curl MATL 22.5.0 +curl -L "https://github.com/lmendo/MATL/archive/refs/tags/22.5.0.tar.gz" -o MATL.tar.xz +tar xf MATL.tar.xz --strip-components=1 +rm MATL.tar.xz \ No newline at end of file diff --git a/packages/MATL/22.5.0/environment b/packages/MATL/22.5.0/environment new file mode 100644 index 0000000..015acc2 --- /dev/null +++ b/packages/MATL/22.5.0/environment @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Path to MATL binary +export PATH=$PWD/bin:$PATH +export MATL_PATH=$PWD \ No newline at end of file diff --git a/packages/MATL/22.5.0/metadata.json b/packages/MATL/22.5.0/metadata.json new file mode 100644 index 0000000..07cdc09 --- /dev/null +++ b/packages/MATL/22.5.0/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "matl", + "version": "22.5.0", + "aliases": [] +} diff --git a/packages/MATL/22.5.0/run b/packages/MATL/22.5.0/run new file mode 100644 index 0000000..8576158 --- /dev/null +++ b/packages/MATL/22.5.0/run @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# get file as first argument +file="$1" + +# remove the file from $@ +shift + +# use the rest of the arguments as stdin +stdin=`printf "%s\n" "$@"` + +# pass stdin into octave which will run MATL +echo "$stdin" | octave -W -p "$MATL_PATH" --eval "matl -of '$file'" diff --git a/packages/MATL/22.5.0/test.matl b/packages/MATL/22.5.0/test.matl new file mode 100644 index 0000000..97791fa --- /dev/null +++ b/packages/MATL/22.5.0/test.matl @@ -0,0 +1 @@ +'OK' \ No newline at end of file diff --git a/readme.md b/readme.md index 0cc0fa4..cebde53 100644 --- a/readme.md +++ b/readme.md @@ -351,6 +351,7 @@ Content-Type: application/json `llvm_ir`, `lolcode`, `lua`, +`matl`, `nasm`, `nasm64`, `nim`,