Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
cecho
0002-Add-a-script-which-allows-running-of-any-e...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Add-a-script-which-allows-running-of-any-example.patch of Package cecho
From 67ef7d7d40d54454c22248410414ef26c7e18971 Mon Sep 17 00:00:00 2001 From: Anthony Molinaro <anthonym@alumni.caltech.edu> Date: Sat, 28 Apr 2018 21:43:32 +0000 Subject: [PATCH] Add a script which allows running of any example. --- examples.escript | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 examples.escript diff --git a/examples.escript b/examples.escript new file mode 100755 index 0000000..00b779b --- /dev/null +++ b/examples.escript @@ -0,0 +1,37 @@ +#!/usr/bin/env escript +%%! -noinput -pa ../cecho/_build/default/lib/cecho/ebin +A 50 + +%% Read the LICENSE file +-include_lib("cecho/include/cecho.hrl"). +main(["countdown"]) -> + cecho_example:countdown(); +main(["simple"]) -> + cecho_example:simple(); +main(["colors"]) -> + cecho_example:colors(); +main(["input"]) -> + cecho_example:input(); +main(["cursmove"]) -> + cecho_example:cursmove(); +main(["helloworld"]) -> + cecho_example:helloworld(); +main(_) -> + io:format("Usage: ./examples.escript <example>\n"), + io:format("\n"), + io:format("where <example> is one of\n"), + io:format("\n"), + io:format(" countdown - Simple countdown which shows\n"), + io:format(" how to print, move and get\n"), + io:format(" coordinates\n"), + io:format("\n"), + io:format(" simple - Simple example to show usage\n"), + io:format("\n"), + io:format(" colors - Fun with colors\n"), + io:format("\n"), + io:format(" input - Prints a number continuously as another\n"), + io:format(" io thread is waiting for keyinput\n"), + io:format("\n"), + io:format(" cursmove - move the '@' around the screen with the\n"), + io:format(" arrow keys. 'q' to quit.\n"), + io:format("\n"), + io:format(" helloworld - bounce 'Hello World!' around the screen\n"). -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor