Update setup.bash to use portable $sudo_cmd syntax
				
					
				
			This commit is contained in:
		
							parent
							
								
									351056f9bc
								
							
						
					
					
						commit
						a24f92df98
					
				| @ -12,6 +12,10 @@ | |||||||
| # curl -fsSL https://example.com/setup-min.bash | bash | # curl -fsSL https://example.com/setup-min.bash | bash | ||||||
| # wget -nv https://example.com/setup-min.bash -O - | bash | # wget -nv https://example.com/setup-min.bash -O - | bash | ||||||
| 
 | 
 | ||||||
|  | # Not every platform has or needs sudo, gotta save them O(1)s... | ||||||
|  | sudo_cmd="" | ||||||
|  | ((EUID)) && [[ -z "$ANDROID_ROOT" ]] && sudo_cmd="sudo" | ||||||
|  | 
 | ||||||
| dont_install_deps="$1" | dont_install_deps="$1" | ||||||
| set -e | set -e | ||||||
| set -u | set -u | ||||||
| @ -287,7 +291,7 @@ if [ -n "${NODEJS_VER}" ]; then | |||||||
|   bash "/tmp/${INSTALL_FILE}" "${NODEJS_VER}" |   bash "/tmp/${INSTALL_FILE}" "${NODEJS_VER}" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| sudo chown -R $(whoami) $node_install_path/lib/node_modules | $sudo_cmd chown -R $(whoami) $node_install_path/lib/node_modules | ||||||
| 
 | 
 | ||||||
| echo "" | echo "" | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user