File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11/** *****************************************
22 *
3- * Get and run Ammonite (http://lihaoyi.github.io/Ammonite/#Ammonite-Shell):
3+ * Get Ammonite (http://lihaoyi.github.io/Ammonite/#Ammonite-Shell):
44 * $ mkdir ~/.ammonite; curl -L -o ~/.ammonite/predef.scala http://git.io/vR04f
5- * $ curl -L -o amm http://git.io/vR08A; chmod +x amm; ./amm
5+ * $ curl -L -o amm http://git.io/vR08A; chmod +x amm
66 *
7- * Run script:
8- * @ load.exec(" fucking-coffee.scala")
7+ * Run script
8+ * $ ./amm fucking-coffee.scala
99 *
1010 *******************************************/
1111
1212import java .net ._
1313import java .io ._
1414import ammonite .ops ._
15+ import ammonite .ops .ImplicitWd ._
1516
1617val coffeeMachineIP = " 10.10.42.42"
1718val password = " 1234"
@@ -25,6 +26,7 @@ if ((%%who "-q").out.string.contains(sys.props("user.name"))) {
2526 val out = new PrintWriter (telnet.getOutputStream, true )
2627 val in = new BufferedReader (new InputStreamReader (telnet.getInputStream))
2728
29+ println(s " Wait for $delayBeforeBrew seconds " )
2830 Thread .sleep(delayBeforeBrew * 1000 );
2931
3032 if (in.readLine == passwordPrompt){
You can’t perform that action at this time.
0 commit comments