File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- #  Install protoc
2+ #  Copyright 2024 gRPC authors.
3+ # 
4+ #  Licensed under the Apache License, Version 2.0 (the "License");
5+ #  you may not use this file except in compliance with the License.
6+ #  You may obtain a copy of the License at
7+ # 
8+ #       http://www.apache.org/licenses/LICENSE-2.0
9+ # 
10+ #  Unless required by applicable law or agreed to in writing, software
11+ #  distributed under the License is distributed on an "AS IS" BASIS,
12+ #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ #  See the License for the specific language governing permissions and
14+ #  limitations under the License.
15+ 
16+ set  -eu -o pipefail
17+ 
18+ #  Perform installation of protoc from source based on OS.
19+ 
320PROTOC_VERSION=" 25.2" 
421
522#  Function to download pre-built binaries for Linux with
@@ -25,10 +42,10 @@ install_protoc() {
2542    die " Unsupported architecture. Please consider manual installation." 
2643  fi 
2744  #  Detect the Operating System
28-   OS=$( uname -s) 
29-   case  " $OS " in 
45+   case  " $( uname -s) " in 
3046    " Darwin" $ARCH  " osx" " $1 " 
3147    " Linux" $ARCH  " linux" $1 ;;
32-   * ) echo  " Unsupported operating system. Please consider manual installation." 
48+   * ) echo  " Please consider manual installation from \ 
49+      https://github.com/protocolbuffers/protobuf/releases/ and add to PATH"   ;;
3350  esac 
3451}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments