diff --git a/packages/retina/1.2.0/build.sh b/packages/retina/1.2.0/build.sh new file mode 100644 index 0000000..9712458 --- /dev/null +++ b/packages/retina/1.2.0/build.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# get dotnet 2.2.8 as a dependency for retina +curl "https://download.visualstudio.microsoft.com/download/pr/022d9abf-35f0-4fd5-8d1c-86056df76e89/477f1ebb70f314054129a9f51e9ec8ec/dotnet-sdk-2.2.207-linux-x64.tar.gz" -Lo dotnet.tar.gz +tar xzf dotnet.tar.gz --strip-components=1 +rm dotnet.tar.gz + +export DOTNET_CLI_HOME=$PWD +./dotnet new console -o cache_application + +rm -rf cache_application + +# curl retina version 1.2.0 +curl -L "https://github.com/m-ender/retina/releases/download/v1.2.0/retina-linux-x64.tar.gz" -o retina.tar.xz +tar xf retina.tar.xz --strip-components=1 +rm retina.tar.xz + +# move the libhostfxr.so file to the current directory so we don't have to set DOTNET_ROOT +mv host/fxr/2.2.8/libhostfxr.so libhostfxr.so + +# give execute permissions to retina +chmod +x Retina \ No newline at end of file diff --git a/packages/retina/1.2.0/environment b/packages/retina/1.2.0/environment new file mode 100644 index 0000000..d9b5a4d --- /dev/null +++ b/packages/retina/1.2.0/environment @@ -0,0 +1,4 @@ +#!/bin/bash + +export PATH=$PWD/bin:$PATH +export RETINA_PATH=$PWD \ No newline at end of file diff --git a/packages/retina/1.2.0/metadata.json b/packages/retina/1.2.0/metadata.json new file mode 100644 index 0000000..f632d6b --- /dev/null +++ b/packages/retina/1.2.0/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "retina", + "version": "1.2.0", + "aliases": ["ret"] +} diff --git a/packages/retina/1.2.0/run b/packages/retina/1.2.0/run new file mode 100644 index 0000000..bb64b05 --- /dev/null +++ b/packages/retina/1.2.0/run @@ -0,0 +1,15 @@ +#!/bin/bash + +# retina doesn't take interactive stdin and doesn't take args either + +# save the file for later +file="$1" + +# remove file from $@ +shift + +# join arguments on newline +stdin=`printf "%s\n" "$@"` + +# pass stdin into Retina command with file as argument +echo "$stdin" | "$RETINA_PATH"/Retina "$file" \ No newline at end of file diff --git a/packages/retina/1.2.0/test.ret b/packages/retina/1.2.0/test.ret new file mode 100644 index 0000000..c4b21da --- /dev/null +++ b/packages/retina/1.2.0/test.ret @@ -0,0 +1 @@ +K`OK \ No newline at end of file diff --git a/readme.md b/readme.md index bc19ab4..d36c1a1 100644 --- a/readme.md +++ b/readme.md @@ -381,6 +381,7 @@ Content-Type: application/json `pyth`, `python`, `python2`, +`retina`, `raku`, `rockstar`, `rscript`,