container.hy 501 B

123456789101112131415161718192021
  1. (require hyrule [-> comment])
  2. (->
  3. (+ 2 2)
  4. (print))
  5. (import subprocess sys)
  6. (subprocess.check_call [sys.executable "-m" "pip" "install" "-q" "sh==1.14.2"])
  7. (import platform)
  8. (comment Windows is not supported by sh (sad day))
  9. (comment https://github.com/amoffat/sh/blob/608f4c3bf5ad75ad40035d03a9c5ffcce0898f07/sh.py#L33-L36)
  10. (if (= (.system platform) "Windows")
  11. (defn echo [dashn num] (return num))
  12. (import sh [echo]))
  13. (->
  14. (+
  15. (int (echo "-n" 21))
  16. (int (echo "-n" 21)))
  17. (print))