-
Notifications
You must be signed in to change notification settings - Fork 0
/
try.cmd
executable file
·31 lines (30 loc) · 1.2 KB
/
try.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
::/*#! 2> /dev/null #
@ 2>/dev/null # 2>nul & echo off & goto BOF #
if [ -z ${SIREUM_HOME} ]; then #
echo "Please set SIREUM_HOME env var" #
exit -1 #
fi #
exec ${SIREUM_HOME}/bin/sireum slang run "$0" "$@" #
:BOF
setlocal
if not defined SIREUM_HOME (
echo Please set SIREUM_HOME env var
exit /B -1
)
%SIREUM_HOME%\bin\sireum.bat slang run "%0" %*
exit /B %errorlevel%
::!#*/
// #Sireum
import org.sireum._
val cwd = Os.slashDir
val sireumHome = Os.path(Os.env("SIREUM_HOME").get)
val sireumJar = sireumHome / "bin" / "sireum.jar"
val plugins: Os.Path = Os.kind match {
case Os.Kind.Mac => sireumHome / "bin" / "mac" / "idea" / "IVE.app" / "Contents" / "plugins"
case Os.Kind.Linux => sireumHome / "bin" / "linux" / "idea" / "plugins"
case Os.Kind.LinuxArm => sireumHome / "bin" / "linux" / "arm" / "idea" / "plugins"
case Os.Kind.Win => sireumHome / "bin" / "win" / "idea" / "plugins"
case _ => halt("Unsupported OS")
}
(cwd / "intellij-plugin.zip").unzipTo(plugins)
(plugins / "sireum-intellij-plugin" / "lib" / sireumJar.name).mklink(sireumJar)