Skip to content

Commit 8c0d68c

Browse files
committed
Update makefile to detect Raspberry Pi / Raspbian
Previous method returned hostname, which could easily be different from "raspberrypi" if changed by the user, suggested change relies on looking in /etc/os-release for ID=raspbian which is hostname agnostic.
1 parent 265fdd0 commit 8c0d68c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ VERSION := $(shell echo $(shell grep -r VERSION= propelleride.pri \
2020
| sed -e 's/ /./g')
2121

2222
# if CPU (uname -m) equals...
23-
ifeq ($(shell uname -n),raspberrypi) # if Raspberry Pi
23+
ifneq ($(shell cat /etc/os-release | grep "ID=raspbian"),"") # if Raspberry Pi
2424
CPU := armhf
2525
else
2626
ifeq ($(shell uname -m),i686) # if i686

0 commit comments

Comments
 (0)