-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed to use Proyek instead of mill build tasks.
- Loading branch information
Showing
4 changed files
with
66 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
/out | ||
target | ||
/versions.properties | ||
/bin/install | ||
/bin/mill.bat | ||
/bin/prelude.sh | ||
/bin/platform.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
::/*#! 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 -n "%0" %* | ||
exit /B %errorlevel% | ||
::!#*/ | ||
// #Sireum | ||
|
||
import org.sireum._ | ||
import org.sireum.project.ProjectUtil._ | ||
import org.sireum.project.JSON | ||
|
||
|
||
def usage(): Unit = { | ||
println("Usage: [ json ]") | ||
} | ||
|
||
var isDot = T | ||
|
||
Os.cliArgs match { | ||
case ISZ(string"json") => isDot = F | ||
case ISZ(string"-h") => | ||
usage() | ||
Os.exit(0) | ||
case ISZ() => | ||
case _ => | ||
usage() | ||
Os.exit(-1) | ||
} | ||
|
||
val homeDir = Os.slashDir.up.canon | ||
|
||
val projects = ISZ( | ||
homeDir, | ||
homeDir / "runtime", | ||
homeDir / "slang" | ||
) | ||
|
||
loadFromBaseDirs(projects) match { | ||
case Some(project) => | ||
if (isDot) { | ||
val projectDot = homeDir / "project.dot" | ||
projectDot.writeOver(toDot(project)) | ||
println(s"Wrote $projectDot") | ||
} else { | ||
println(JSON.fromProject(project, T)) | ||
} | ||
case _ => | ||
Os.exit(-1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters