Skip to content

Commit

Permalink
lowercase parameter values for hw
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <[email protected]>
  • Loading branch information
mstormi committed May 21, 2020
1 parent e60a0b9 commit 4984636
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build-image/openhabian.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ clonebranch=master
mode=unattended

# Hardware
# Pi0, Pi0W, Pi1, CM1, Pi2, Pi3, CM3, Pi3+, CM3+, Pi4
#hw=Pi3
# pi0, pi0w, pi1, cm1, pi2, pi3, cm3, pi3+, cm3+, pi4
#hw=pi3

# Hardware architecture
# x86_64, amd64, armv6l, armv7l, aarch64, arm64
Expand Down
4 changes: 2 additions & 2 deletions build-image/openhabian.pi-raspbian.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ clonebranch=master
mode=unattended

# Hardware
# Pi0, Pi0W, Pi1, CM1, Pi2, Pi3, CM3, Pi3+, CM3+, Pi4
#hw=Pi3
# pi0, pi0w, pi1, cm1, pi2, pi3, cm3, pi3+, cm3+, pi4
#hw=pi3

# Hardware architecture
# x86_64, amd64, armv6l, armv7l, aarch64, arm64
Expand Down
14 changes: 7 additions & 7 deletions functions/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ cond_echo() {

is_pizero() {
# shellcheck disable=SC2154
if [[ "$hw" == "Pi0" ]]; then return 0; fi
if [[ "$hw" == "pi0" ]]; then return 0; fi
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pizerow() {
if [[ "$hw" == "Pi0W" ]]; then return 0; fi
if [[ "$hw" == "pi0w" ]]; then return 0; fi
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[cC][0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pione() {
if [[ "$hw" == "Pi1" ]]; then return 0; fi
if [[ "$hw" == "pi1" ]]; then return 0; fi
if grep -q "^Revision\\s*:\\s*00[0-9a-fA-F][0-9a-fA-F]$" /proc/cpuinfo; then
return 0
elif grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$" /proc/cpuinfo; then
Expand All @@ -54,22 +54,22 @@ is_pione() {
fi
}
is_pitwo() {
if [[ "$hw" == "Pi2" ]]; then return 0; fi
if [[ "$hw" == "pi2" ]]; then return 0; fi
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pithree() {
if [[ "$hw" == "Pi3" ]]; then return 0; fi
if [[ "$hw" == "pi3" ]]; then return 0; fi
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]08[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pithreeplus() {
if [[ "$hw" == "Pi3+" ]]; then return 0; fi
if [[ "$hw" == "pi3+" ]]; then return 0; fi
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0d[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pifour() {
if [[ "$hw" == "Pi4" ]]; then return 0; fi
if [[ "$hw" == "pi4" ]]; then return 0; fi
! grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
Expand Down
4 changes: 2 additions & 2 deletions openhabian.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ clonebranch=master
mode=unattended

# Hardware
# Pi0, Pi0W, Pi1, CM1, Pi2, Pi3, CM3, Pi3+, CM3+, Pi4
#hw=Pi3
# pi0, pi0w, pi1, cm1, pi2, pi3, cm3, pi3+, cm3+, pi4
#hw=pi3

# Hardware architecture
# x86_64, amd64, armv6l, armv7l, aarch64, arm64
Expand Down

0 comments on commit 4984636

Please sign in to comment.