Skip to content

Commit

Permalink
shellchecked+syntax error fixed
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 59f8f79 commit e60a0b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ cond_echo() {
}

is_pizero() {
# shellcheck disable=SC2154
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 $?
Expand All @@ -58,7 +59,7 @@ is_pitwo() {
return $?
}
is_pithree() {
if [[ "$hw" == "Pi3" ]]; 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 $?
}
Expand All @@ -85,6 +86,7 @@ is_arm() {
return 1;
}
is_arm64() {
# shellcheck disable=SC2154
if [[ "$hwarch" == "arm64" ]]; then return 0; fi
case "$(uname -m)" in
arm64) return 0 ;;
Expand Down Expand Up @@ -120,6 +122,7 @@ is_x86_64() {
esac
}
is_ubuntu() {
# shellcheck disable=SC2154
if [[ "$release" == "ubuntu" ]]; then return 0; fi
[[ $(cat /etc/*release*) =~ "Ubuntu" ]]
return $?
Expand Down

0 comments on commit e60a0b9

Please sign in to comment.