7 lines
		
	
	
		
			204 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
		
			204 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/zsh
 | 
						|
 | 
						|
# wrapper for mv; for the given target, create any dirs which do not already exist
 | 
						|
mvd_target_dir=$(dirname "${@: -1}")
 | 
						|
[[ ! -d "$mvd_target_dir" ]] && mkdir -p "$mvd_target_dir"
 | 
						|
exec mv "$@"
 |