Skip to content

Commit

Permalink
fix: use arch that's passed in instead of system arch
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Alvarez <[email protected]>
  • Loading branch information
pendo324 committed Jul 12, 2024
1 parent 5584dc0 commit 6a41264
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile.darwin
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ install.dependencies: install.os install.lima-dependencies install.lima-socket-v
install.os: $(OS_OUTDIR)/$(FINCH_OS_BASENAME)

$(OS_OUTDIR)/$(FINCH_OS_BASENAME): $(OS_OUTDIR) $(CURDIR)/deps/full-os.conf
bash deps/install.sh --output $@ $(CURDIR)/deps/full-os.conf
bash deps/install.sh --arch $(ARCH) --output $@ $(CURDIR)/deps/full-os.conf

.PHONY: install.lima-dependencies
install.lima-dependencies: download.lima-dependencies $(LIMA_OUTDIR)
Expand All @@ -40,7 +40,7 @@ install.lima-dependencies: download.lima-dependencies $(LIMA_OUTDIR)
download.lima-dependencies: $(LIMA_DOWNLOAD_DIR)/$(LIMA_DEPENDENCY_FILE_NAME)

$(LIMA_DOWNLOAD_DIR)/$(LIMA_DEPENDENCY_FILE_NAME): $(LIMA_DOWNLOAD_DIR) $(CURDIR)/deps/lima-bundles.conf
bash deps/install.sh --output $@ $(CURDIR)/deps/lima-bundles.conf
bash deps/install.sh --arch $(ARCH) --output $@ $(CURDIR)/deps/lima-bundles.conf

.PHONY: install.lima-socket-vmnet
install.lima-socket-vmnet:
Expand Down
7 changes: 6 additions & 1 deletion deps/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd -- "${CURRENT_DIR}/.." && pwd)"

file=""
arch=""
sources=""

while [[ $# -gt 0 ]]; do
Expand All @@ -22,6 +23,11 @@ while [[ $# -gt 0 ]]; do
file=$1
shift # past value
;;
--arch|-a)
shift # past argument
arch=$1
shift # past value
;;
--*|-*)
echo "error: unknown option $1"
exit 1
Expand All @@ -44,7 +50,6 @@ artifact=""
digest=""
url="${ARTIFACT_BASE_URL}"

arch="$(uname -m)"
case "${arch}" in
"arm64")
if [[ -z "$AARCH64_ARTIFACT" ]]; then
Expand Down

0 comments on commit 6a41264

Please sign in to comment.