diff --git a/packages/rockstar/1.0.0/build.sh b/packages/rockstar/1.0.0/build.sh new file mode 100755 index 0000000..baaa9f0 --- /dev/null +++ b/packages/rockstar/1.0.0/build.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Download and install NodeJS +curl "https://nodejs.org/dist/v15.10.0/node-v15.10.0-linux-x64.tar.xz" -o node.tar.xz +tar xf node.tar.xz --strip-components=1 +rm node.tar.xz +export PATH=$PWD/bin:$PATH + +# Pull Rockstar reference implementation project +git clone -q "https://github.com/RockstarLang/rockstar.git" rockstar +cd rockstar +git reset --hard bc9eedc6acb7c0f31a425cc204dcd93cb3e68936 + +# Install Satriani dependencies +cd satriani +npm install +cd ../.. + +# Suppress "(program returned no output)" output at the end of each program +sed -i 's/console.log(result ? result : "(program returned no output)");/if (result) console.log(result);/g' rockstar/satriani/rockstar.js diff --git a/packages/rockstar/1.0.0/environment b/packages/rockstar/1.0.0/environment new file mode 100644 index 0000000..19eafb2 --- /dev/null +++ b/packages/rockstar/1.0.0/environment @@ -0,0 +1,2 @@ +export ROCKSTAR_PATH=$PWD/rockstar/satriani +export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/rockstar/1.0.0/metadata.json b/packages/rockstar/1.0.0/metadata.json new file mode 100644 index 0000000..6f3957b --- /dev/null +++ b/packages/rockstar/1.0.0/metadata.json @@ -0,0 +1,6 @@ +{ + "language": "rockstar", + "version": "1.0.0", + "author": "Dan Vargas ", + "aliases": ["rockstar", "rock"] +} \ No newline at end of file diff --git a/packages/rockstar/1.0.0/run b/packages/rockstar/1.0.0/run new file mode 100644 index 0000000..7cac84f --- /dev/null +++ b/packages/rockstar/1.0.0/run @@ -0,0 +1,3 @@ +#!/bin/bash + +node $ROCKSTAR_PATH/rockstar "$@" \ No newline at end of file diff --git a/packages/rockstar/1.0.0/test.rock b/packages/rockstar/1.0.0/test.rock new file mode 100644 index 0000000..eebfa1c --- /dev/null +++ b/packages/rockstar/1.0.0/test.rock @@ -0,0 +1,9 @@ +My heart is burning powerless +My mind is failing right +Cast my heart +Cast my mind + +My feelings are empty +Let my feelings be with my heart +Let my feelings be with my mind +Shout my feelings \ No newline at end of file