Skip to content

Instantly share code, notes, and snippets.

@enthus1ast
Created November 3, 2019 13:01
Show Gist options
  • Save enthus1ast/13f7efddce9ee192dfd21045056c6a2e to your computer and use it in GitHub Desktop.
Save enthus1ast/13f7efddce9ee192dfd21045056c6a2e to your computer and use it in GitHub Desktop.
import distros
import macros
macro whichOs(): untyped =
result = newStmtList()
for dist in Distribution:
result.add newCall("echo", newLit dist , newLit " ", newCall("detectOs", newIdentNode($dist)))
whichOs()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment