Add IS_ARMBIAN variable

This commit is contained in:
Taylor Helsper 2019-12-21 19:57:13 -06:00
parent 73867346f4
commit 46b042941e

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Device info # Device info
IS_ARMBIAN=0
IS_ROCK64=0 IS_ROCK64=0
IS_ROCKPRO64=0 IS_ROCKPRO64=0
IS_RASPI=0 IS_RASPI=0
@ -11,8 +12,10 @@ DEVICE_TYPE="unknown"
MODEL=$(cat /proc/device-tree/model) || MODEL="unknown" MODEL=$(cat /proc/device-tree/model) || MODEL="unknown"
uname -a | grep amd64 && IS_X86=1 || true uname -a | grep amd64 && IS_X86=1 || true
if [[ $MODEL == *"Rock64"* ]]; then if [[ $MODEL == *"Rock64"* ]]; then
IS_ARMBIAN=1
IS_ROCK64=1 IS_ROCK64=1
elif [[ $MODEL == *"RockPro64"* ]]; then elif [[ $MODEL == *"RockPro64"* ]]; then
IS_ARMBIAN=1
IS_ROCKPRO64=1 IS_ROCKPRO64=1
elif [[ $MODEL == *"Raspberry Pi 3"* ]]; then elif [[ $MODEL == *"Raspberry Pi 3"* ]]; then
IS_RASPI=1 IS_RASPI=1