mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 01:45:50 +08:00 
			
		
		
		
	Some shells do not have a nullglob feature, including dash (default /bin/sh on Ubuntu) and the Almquist shell (default /bin/sh on FreeBSD). An mv(1) command in setup_dir is failing due to a glob not matching anything, so use a more widely supported construction.
		
			
				
	
	
		
			14 lines
		
	
	
		
			134 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			134 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| (
 | |
|   cd ../..
 | |
| 
 | |
|   # Back up
 | |
| 
 | |
|   mkdir -p bak
 | |
|   for SRC in v* src alias; do
 | |
|     [ -e "$SRC" ] && mv "$SRC" bak
 | |
|   done
 | |
|   true
 | |
| )
 |