mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	replaced undocumented option for specifying the profile as first argument to specifying it as a environment variable (eg: PROFILE=~/.myprofile ./install-gitless.sh)
also; fixed indentation and added .zshrc as possible profile
This commit is contained in:
		| @@ -31,12 +31,12 @@ echo "Downloaded" | ||||
|  | ||||
| echo | ||||
|  | ||||
| # Detect profile file, .bash_profile has precedence over .profile | ||||
| if [ ! -z "$1" ]; then | ||||
|   PROFILE="$1" | ||||
| else | ||||
| # Detect profile file if not specified as environment variable (eg: PROFILE=~/.myprofile). | ||||
| if [ -z "$PROFILE" ]; then | ||||
|   if [ -f "$HOME/.bash_profile" ]; then | ||||
|     PROFILE="$HOME/.bash_profile" | ||||
|   elif [ -f "$HOME/.zshrc" ]; then | ||||
|     PROFILE="$HOME/.zshrc" | ||||
|   elif [ -f "$HOME/.profile" ]; then | ||||
|     PROFILE="$HOME/.profile" | ||||
|   fi | ||||
|   | ||||
| @@ -28,10 +28,8 @@ fi | ||||
|  | ||||
| echo | ||||
|  | ||||
| # Detect profile file, .bash_profile has precedence over .profile | ||||
| if [ ! -z "$1" ]; then | ||||
|   PROFILE="$1" | ||||
| else | ||||
| # Detect profile file if not specified as environment variable (eg: PROFILE=~/.myprofile). | ||||
| if [ ! "$PROFILE" ]; then | ||||
|   if [ -f "$HOME/.bash_profile" ]; then | ||||
|     PROFILE="$HOME/.bash_profile" | ||||
|   elif [ -f "$HOME/.zshrc" ]; then | ||||
|   | ||||
		Reference in New Issue
	
	Block a user