Big cleanup of bin/, move external programs to contrib/, move minor useful scripts to aux/, and most important of all move controller.rc to werc.rc
This commit is contained in:
		
							parent
							
								
									4f75a5b3b6
								
							
						
					
					
						commit
						eac8d656f3
					
				
					 9 changed files with 1 additions and 23 deletions
				
			
		
							
								
								
									
										17
									
								
								bin/md_cache.rc
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								bin/md_cache.rc
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| #!/usr/bin/env rc | ||||
| . 9.rc | ||||
| 
 | ||||
| cachedir=/tmp/md_cache | ||||
| mkdir -p $cachedir >[2]/dev/null | ||||
| 
 | ||||
| tmpfile=$cachedir/mdtmp.$pid | ||||
| score=`{{tee $tmpfile || exit 1} | sha1sum} | ||||
| cachefile=$cachedir/$score | ||||
| 
 | ||||
| if(test -f $cachefile) | ||||
|     cat $cachefile | ||||
| if not { | ||||
|     markdown.pl < $tmpfile | tee $cachefile.$pid | ||||
|     mv $cachefile.$pid $cachefile | ||||
| } | ||||
| rm $tmpfile >[2]/dev/null | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Uriel
						Uriel