mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			388 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			388 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| set -e
 | |
| . ../../../nvm.sh
 | |
| 
 | |
| # Remove the stuff we're clobbering.
 | |
| [ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
 | |
| [ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
 | |
| 
 | |
| # Install from binary
 | |
| nvm install 0.9.7
 | |
| nvm install 0.9.12
 | |
| 
 | |
| # Check
 | |
| [ -d ../../../v0.9.7 ]
 | |
| [ -d ../../../v0.9.12 ]
 | |
| 
 | |
| # Use the first one
 | |
| nvm use 0.9.7
 | |
| 
 | |
| # Use the latest one
 | |
| nvm use 0.9
 | |
| node --version | grep v0.9.12
 | |
| 
 |