Skip to content

Commit d67f7ba

Browse files
committed
Update test
- Credits to @framps
1 parent ddda68d commit d67f7ba

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

rpi-clone

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ fi
2929

3030
rpios=0
3131
rpios_recent=0
32-
if [ -f /etc/os-release ] && [ -f /proc/device-tree/model ]
32+
if [ -f /etc/os-release ]
3333
then
34-
pretty=`cat /etc/os-release | grep PRETTY`
3534
osversion=`cat /etc/os-release | grep VERSION_ID | cut -d'"' -f2`
36-
model=`tr -d '\0' < /proc/device-tree/model`
37-
if [[ "$pretty" == *"Raspbian"* || ("$model" == *"Raspberry"* && "$pretty" == *"Debian"*) ]]
38-
then
35+
if [[ -e /etc/rpi-issue ]]; then
3936
rpios=1
4037
fi
41-
if ((rpios)) && ((osversion >= 10))
42-
then
38+
if ((rpios)) && ((osversion >= 10)); then
4339
rpios_recent=1
4440
fi
4541
fi

0 commit comments

Comments
 (0)