Compare commits
No commits in common. "79c7f471a1a09c0b89127a48f13a27460414dc32" and "00bd2986659c6112091f20a55c141cacf4c9b7e4" have entirely different histories.
79c7f471a1
...
00bd298665
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Run jar file
|
# Run jar file
|
||||||
shift
|
java -jar code.jar
|
||||||
java -jar code.jar "$@"
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"version": "3.10.0-alpha.7",
|
"version": "3.10.0-alpha.7",
|
||||||
"aliases": ["py", "py3", "python3"]
|
"aliases": ["py", "python3"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"version": "3.5.10",
|
"version": "3.5.10",
|
||||||
"aliases": ["py", "py3", "python3"]
|
"aliases": ["py", "python3"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"version": "3.9.1",
|
"version": "3.9.1",
|
||||||
"aliases": ["py", "py3", "python3"]
|
"aliases": ["py", "python3"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"version": "3.9.4",
|
"version": "3.9.4",
|
||||||
"aliases": ["py", "py3", "python3"]
|
"aliases": ["py", "python3"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Download and extract JDK8
|
# Scala depends on Java
|
||||||
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz" -o jdk.tar.gz
|
mkdir -p java
|
||||||
tar xzf jdk.tar.gz --strip-components=1
|
cd java
|
||||||
rm jdk.tar.gz
|
curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" -o java.tar.gz
|
||||||
|
tar xzf java.tar.gz --strip-components=1
|
||||||
|
rm java.tar.gz
|
||||||
|
cd ..
|
||||||
|
|
||||||
# Download and extract Scala 3
|
mkdir -p scala
|
||||||
curl -L "https://github.com/lampepfl/dotty/releases/download/3.0.0/scala3-3.0.0.tar.gz" -o scala.tar.gz
|
cd scala
|
||||||
|
curl -L "https://github.com/lampepfl/dotty/releases/download/3.0.0-RC1/scala3-3.0.0-RC1.tar.gz" -o scala.tar.gz
|
||||||
tar -xzf scala.tar.gz --strip-components=1
|
tar -xzf scala.tar.gz --strip-components=1
|
||||||
rm scala.tar.gz
|
rm scala.tar.gz
|
||||||
|
cd ..
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Compile scala classes into a jar file
|
|
||||||
scalac "$@" -d out.jar
|
|
||||||
|
|
||||||
# Create the Manifest and include scala lib jars:
|
|
||||||
# NOTE: - entry point will only consider @main and App traits from the main file
|
|
||||||
# - scala lib jars will be added to the class path in order to run the jar properly
|
|
||||||
echo "Main-Class: $(grep -oP '\@main\s+def\s+\K[a-zA-Z][a-zA-Z0-9]*|object\s+\K[a-zA-Z][a-zA-Z0-9]*(?=\s+extends\s+App)' $1)
|
|
||||||
Class-Path: $(echo $JAVA_HOME/lib/*.jar | sed 's/\s/\n /g')
|
|
||||||
|
|
||||||
" > manifest.txt
|
|
||||||
|
|
||||||
# Update the jar with the manifest
|
|
||||||
jar ufm out.jar manifest.txt
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Scala requires JAVA_HOME to be set
|
# Scala requires JAVA_HOME to be set
|
||||||
export JAVA_HOME=$PWD
|
export JAVA_HOME=$PWD/java
|
||||||
export PATH=$PWD/bin:$PATH
|
export PATH=$PWD/scala/bin:$PATH
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"language": "scala",
|
"language": "scala",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"aliases": ["sc"]
|
"aliases": ["scala", "sc"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Run jar file
|
# Put instructions to run the runtime
|
||||||
|
mv $1 $1.scala
|
||||||
|
filename=$1.scala
|
||||||
shift
|
shift
|
||||||
java -jar out.jar "$@"
|
scala $filename "$@"
|
||||||
|
|
Loading…
Reference in New Issue