Skip to content

Commit e907c8c

Browse files
committed
fix: use correct repository on arm64 ubuntu image
1 parent 09a7cb8 commit e907c8c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
HARDWARE = $(shell uname -m)
22
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
3+
ARCH = $(shell dpkg --print-architecture)
34
SHFMT_VERSION = 3.0.2
45
XUNIT_TO_GITHUB_VERSION = 0.3.0
56
XUNIT_READER_VERSION = 0.1.0
@@ -21,7 +22,11 @@ ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0)
2122
ifeq ($(SYSTEM_NAME),darwin)
2223
brew install shellcheck
2324
else
24-
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse'
25+
ifeq ($(ARCH),arm64)
26+
sudo add-apt-repository 'deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse'
27+
else
28+
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse'
29+
endif
2530
sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean
2631
sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck
2732
endif

0 commit comments

Comments
 (0)