Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release branch #35

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ BUILD_PACKAGES_DIR := "build/packages"

.PHONY: clean help download_packages build build-docker-image $(ALL_TARGETS) $(ALL_PACK_TARGETS)

.NOTPARALLEL: build pack

help:
@echo "Usage:"
@echo " make build"
Expand Down
14 changes: 4 additions & 10 deletions src/compilation/download_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ function download_package() {
local url="$1"
local output="$2"

if [[ -f "$output" ]]; then
>&2 echo "Skipping download: $output already exists"
return 0
fi

wget "$url" -O "$output"
if [[ $? -ne 0 ]]; then
>&2 echo "Error: failed to download $url"
Expand Down Expand Up @@ -98,11 +93,6 @@ function extract_package() {
return 1
fi

if [[ -d "$output_dir" ]]; then
>&2 echo "Skipping extraction: $output_dir already exists"
return 0
fi

pushd "$temp_dir" > /dev/null

unpack_tarball "$tarball_realpath"
Expand All @@ -113,6 +103,10 @@ function extract_package() {

popd > /dev/null

# Make sure output dir is empty, so we could move content into it.
# The directory might not exist, so we need to pass || true so that set -e won't fail us.
rm -rf "$output_dir" || true

mv "$temp_dir/$package_dir" "$output_dir"
if [[ $? -ne 0 ]]; then
return 1
Expand Down
Loading