File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,11 @@ curl --fail -LOs "${download_url}/${src_file}.sha512"
4141
4242#  It is probably redundant to check both the checksum and the signature but it's cheap and why not
4343echo  " Validating SHA512 Checksums" 
44- if  !  (sha512sum " $src_file " |  cut -d '  ' |  tr -d ' \n' |  diff - " $src_file .sha512" ;  then 
44+ #  The '<(echo -e $(<${src_file}.sha512))' part removes possible new lines in the provided .sha512 file.
45+ #  This is due to the NiFi sha512 files sometimes ending on newline and sometimes dont.
46+ #  See https://archive.apache.org/dist/nifi/2.0.0/nifi-2.0.0-source-release.zip.sha512 vs
47+ #      https://archive.apache.org/dist/nifi/1.27.0/nifi-1.27.0-source-release.zip.sha512
48+ if  !  (sha512sum " $src_file " |  cut -d '  ' |  diff - <( echo -e $( < ${src_file} .sha512) ) ;  then 
4549  echo  " ERROR: One of the SHA512 sums does not match" 
4650  exit  1
4751fi 
@@ -54,6 +58,8 @@ if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then
5458  exit  1
5559fi 
5660
61+ exit  0
62+ 
5763echo  " Uploading everything to Nexus" 
5864EXIT_STATUS=0
5965curl --fail -u " $NEXUS_USER :$NEXUS_PASSWORD " " ${src_file} " ' https://repo.stackable.tech/repository/packages/nifi/' ||  EXIT_STATUS=$? 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments