pkg(retina-1.2.0): added retina 1.2.0

This commit is contained in:
Hydrazer 2021-11-27 03:59:56 -07:00
parent 507233400d
commit 6cee1e8c34
6 changed files with 48 additions and 0 deletions

22
packages/retina/1.2.0/build.sh vendored Normal file
View File

@ -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

4
packages/retina/1.2.0/environment vendored Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
export PATH=$PWD/bin:$PATH
export RETINA_PATH=$PWD

5
packages/retina/1.2.0/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "retina",
"version": "1.2.0",
"aliases": ["ret"]
}

15
packages/retina/1.2.0/run vendored Normal file
View File

@ -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"

1
packages/retina/1.2.0/test.ret vendored Normal file
View File

@ -0,0 +1 @@
K`OK

View File

@ -381,6 +381,7 @@ Content-Type: application/json
`pyth`,
`python`,
`python2`,
`retina`,
`raku`,
`rockstar`,
`rscript`,