diff --git a/Makefile.darwin b/Makefile.darwin index 4786657..9ff916c 100644 --- a/Makefile.darwin +++ b/Makefile.darwin @@ -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) @@ -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: diff --git a/deps/install.sh b/deps/install.sh index 32a5bbd..9dc9ff9 100644 --- a/deps/install.sh +++ b/deps/install.sh @@ -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 @@ -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 @@ -44,7 +50,6 @@ artifact="" digest="" url="${ARTIFACT_BASE_URL}" -arch="$(uname -m)" case "${arch}" in "arm64") if [[ -z "$AARCH64_ARTIFACT" ]]; then