pkg(golfscript-1.0.0): Add golfscript 1.0.0

This commit is contained in:
Dan Vargas 2021-04-20 22:27:01 -05:00
parent 7191bc063c
commit 925125daca
5 changed files with 24 additions and 0 deletions

10
packages/golfscript/1.0.0/build.sh vendored Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# golfscript was implemented as a Ruby script originally
source ../../ruby/2.5.1/build.sh
curl "http://www.golfscript.com/golfscript/golfscript.rb" -o bin/golfscript.rb
# using the shebang to run it with the right Ruby
sed -i "s|/usr/bin/|$PWD/bin/|g" bin/golfscript.rb
chmod +x bin/golfscript.rb

4
packages/golfscript/1.0.0/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Path to Ruby and golfscript.rb
export PATH=$PWD/bin:$PATH

View file

@ -0,0 +1,5 @@
{
"language": "golfscript",
"version": "1.0.0",
"aliases": ["golfscript"]
}

4
packages/golfscript/1.0.0/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# golfscript only takes code file and stdin
golfscript.rb "$1"

View file

@ -0,0 +1 @@
"OK"