| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -5,18 +5,16 @@ BOLD='\033[0;1m'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# Create install directory if it doesn't exist
 | 
					 | 
					 | 
					 | 
					# Create install directory if it doesn't exist
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					mkdir -p ${INSTALL_DIR}
 | 
					 | 
					 | 
					 | 
					mkdir -p ${INSTALL_DIR}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					printf "$${BOLD}Installing vscode-server!\n"
 | 
					 | 
					 | 
					 | 
					printf "$${BOLD}Installing vscode-cli!\n"
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# Fetch the latest commit hash for stable release
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					HASH=$(curl -s https://update.code.visualstudio.com/api/commits/stable/server-linux-x64-web | cut -d '"' -f 2)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# Download and extract vscode-server tarball
 | 
					 | 
					 | 
					 | 
					# Download and extract code-cli tarball
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					output=$(curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz && tar -xf vscode_cli.tar.gz -C ${INSTALL_DIR} --strip-components=1 >/dev/null 2>&1)
 | 
					 | 
					 | 
					 | 
					output=$(curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz && tar -xf vscode_cli.tar.gz -C ${INSTALL_DIR} && rm vscode_cli.tar.gz)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					if [ $? -ne 0 ]; then
 | 
					 | 
					 | 
					 | 
					if [ $? -ne 0 ]; then
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  echo "Failed to install vscode-server: $output"
 | 
					 | 
					 | 
					 | 
					  echo "Failed to install vscode-cli: $output"
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  exit 1
 | 
					 | 
					 | 
					 | 
					  exit 1
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					fi
 | 
					 | 
					 | 
					 | 
					fi
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					printf "🥳 vscode-server has been installed.\n\n"
 | 
					 | 
					 | 
					 | 
					printf "🥳 vscode-cli has been installed.\n\n"
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					echo "👷 Running ${INSTALL_DIR}/bin/code serve-web --port ${PORT} --without-connection-token --accept-server-license-terms in the background..."
 | 
					 | 
					 | 
					 | 
					echo "👷 Running ${INSTALL_DIR}/bin/code serve-web --port ${PORT} --without-connection-token --accept-server-license-terms in the background..."
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					echo "Check logs at ${LOG_PATH}!"
 | 
					 | 
					 | 
					 | 
					echo "Check logs at ${LOG_PATH}!"
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |