Skip to content

Commit

Permalink
Merge pull request #8 from kiler129/fix-submodule
Browse files Browse the repository at this point in the history
Add error handling for submodule download
  • Loading branch information
kiler129 authored Apr 16, 2021
2 parents 9c22cea + c271ded commit 169e3f5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build/proxmox/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ cd pve-kernel
# bypasses the process safely.
# This curl skips certificate validation because Proxmox GIT WebUI doesn't send Let's Encrypt intermediate cert
echo "Step 2.2: Downloading base kernel"
curl -k "https://git.proxmox.com/?p=mirror_ubuntu-focal-kernel.git;a=snapshot;h=$(git submodule status submodules/ubuntu-focal | cut -c 2-41);sf=tgz" --output kernel.tgz
tar -xf kernel.tgz -C submodules/ubuntu-focal/ --strip 1
rm kernel.tgz
curl -f -k "https://git.proxmox.com/?p=mirror_ubuntu-focal-kernel.git;a=snapshot;h=$(git submodule status submodules/ubuntu-focal | cut -c 2-41);sf=tgz" --output kernel.tgz || true

if [[ -f "kernel.tgz" ]]; then
tar -xf kernel.tgz -C submodules/ubuntu-focal/ --strip 1
rm kernel.tgz
else
echo "[-] Failed to download flat base kernel (will use git instead)"
fi



Expand Down

0 comments on commit 169e3f5

Please sign in to comment.