summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 392c6a9a..0d307907 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ DOCDIR = doc/pydoc
 CWD = $(shell pwd)
 EDITOR = vim
 
-.PHONY: all clean doc cleandoc edit push test commit install info snapshot
+.PHONY: all clean doc cleandoc edit push test commit install info snapshot minimal_snapshot
 
 info:
 	@echo 'This makefile provides shortcuts for common tasks.'
@@ -56,3 +56,15 @@ commit: test
 
 snapshot:
 	git archive HEAD | gzip > $(NAME)-$(shell git rev-list HEAD | head -n 1 | cut -b 1-16).tar.gz
+
+minimal_snapshot:
+	@echo 'This is not quite working well. I will abort now' && false
+	git checkout -b no_help
+	git rm -rf doc
+	git rm -rf test
+	git rm all_tests.py
+	git rm TODO
+	git commit -a -m'removed documentation'
+	git archive HEAD | gzip > $(NAME)-$(shell git rev-list HEAD | head -n 1 | cut -b 1-16).tar.gz
+	git reset --hard no_help^
+	git branch -D no_help
e>
g a file' href='/akkartik/mu/commit/filesystem.mu?h=main&id=da925d0697d61db6d265fd78cab3d1adf214950c'>da925d06 ^

a621ef95 ^



da925d06 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20




                                                                     

             

                                                                                             
   
                                                       
                  
                                   

        



                                                                    
 
# example program: copy one file into another, character by character
# BEWARE: this will modify your file system
# before running it, put some text into /tmp/mu-x
# after running it, check /tmp/mu-y

def main [
  local-scope
  source-file:&:source:char <- start-reading null/real-filesystem, [/tmp/mu-x]
  sink-file:&:sink:char, write-routine:num <- start-writing null/real-filesystem, [/tmp/mu-y]
  {
    c:char, done?:bool, source-file <- read source-file
    break-if done?
    sink-file <- write sink-file, c
    loop
  }
  close sink-file
  # make sure to wait for the file to be actually written to disk
  # (Mu practices structured concurrency: http://250bpm.com/blog:71)
  wait-for-routine write-routine
]