|  |  | @ -166,17 +166,21 @@ else | 
			
		
	
		
		
			
				
					
					|  |  |  |          ## Remove all but non-essential files |  |  |  |          ## Remove all but non-essential files | 
			
		
	
		
		
			
				
					
					|  |  |  |          # get the name of the current directory |  |  |  |          # get the name of the current directory | 
			
		
	
		
		
			
				
					
					|  |  |  |          currdirname=${PWD##*/} |  |  |  |          currdirname=${PWD##*/} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |          # get a timestamp | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |          timestamp=$(date +%s) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |          # create a unique tmp-dir name | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |          tmpdirname="${timestamp}-${currdirname}" | 
			
		
	
		
		
			
				
					
					|  |  |  |          # make a directory in chepec/tmp with the name of the current dir |  |  |  |          # make a directory in chepec/tmp with the name of the current dir | 
			
		
	
		
		
			
				
					
					|  |  |  |          mkdir /home/taha/chepec/tmp/$currdirname |  |  |  |          mkdir /home/taha/chepec/tmp/$tmpdirname | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |          # Copy the contents of the current directory to the tmp/$currdirname directory |  |  |  |          # Copy the contents of the current directory to the tmp/$currdirname directory | 
			
		
	
		
		
			
				
					
					|  |  |  |          cp * -R /home/taha/chepec/tmp/$currdirname |  |  |  |          cp * -R /home/taha/chepec/tmp/$tmpdirname | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |          # Empty the current directory of all contents |  |  |  |          # Empty the current directory of all contents | 
			
		
	
		
		
			
				
					
					|  |  |  |          rm * -R # note: hidden files and subdir unaffected |  |  |  |          rm * -R # note: hidden files and subdir unaffected | 
			
		
	
		
		
			
				
					
					|  |  |  |          # Return the stuff we want to keep after wipe-dir |  |  |  |          # Return the stuff we want to keep after wipe-dir | 
			
		
	
		
		
			
				
					
					|  |  |  |          cp /home/taha/chepec/tmp/$currdirname/*.Rnw . |  |  |  |          cp /home/taha/chepec/tmp/$tmpdirname/*.Rnw . | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          cp /home/taha/chepec/tmp/$currdirname/vc . |  |  |  |          cp /home/taha/chepec/tmp/$tmpdirname/vc . | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          cp /home/taha/chepec/tmp/$currdirname/vc.tex . |  |  |  |          cp /home/taha/chepec/tmp/$tmpdirname/vc.tex . | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          cp /home/taha/chepec/tmp/$currdirname/vc-git.awk . |  |  |  |          cp /home/taha/chepec/tmp/$tmpdirname/vc-git.awk . | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       fi |  |  |  |       fi | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 		echo "Terminating..." |  |  |  | 		echo "Terminating..." | 
			
		
	
	
		
		
			
				
					|  |  | 
 |