mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	tools.func: better handling when unpacking tarfiles in prebuild mode (#5781)
This commit is contained in:
		@@ -957,7 +957,11 @@ function fetch_and_deploy_gh_release() {
 | 
			
		||||
      fi
 | 
			
		||||
      $STD unzip "$tmpdir/$filename" -d "$target"
 | 
			
		||||
    elif [[ "$filename" == *.tar.* ]]; then
 | 
			
		||||
      if tar -tf "$tmpdir/$filename" | grep -qE '^([^/]+/){2}'; then
 | 
			
		||||
        tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
 | 
			
		||||
      else
 | 
			
		||||
        tar -xf "$tmpdir/$filename" -C "$target"
 | 
			
		||||
      fi
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Unsupported archive format: $filename"
 | 
			
		||||
      rm -rf "$tmpdir"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user