Skip to content

Commit e2ed30c

Browse files
committed
Update to more generic test
- Works for unsupported RPiOS versions (i.e. RPiOS updated to testing/sid) - Once again, credits to @framps
1 parent d67f7ba commit e2ed30c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rpi-clone

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

3030
rpios=0
3131
rpios_recent=0
32-
if [ -f /etc/os-release ]
33-
then
34-
osversion=`cat /etc/os-release | grep VERSION_ID | cut -d'"' -f2`
32+
if [ -f /etc/os-release ]; then
3533
if [[ -e /etc/rpi-issue ]]; then
3634
rpios=1
3735
fi
38-
if ((rpios)) && ((osversion >= 10)); then
36+
pretty="$(cat /etc/os-release | grep PRETTY)"
37+
if ((rpios)) && [[ ! "$pretty" =~ wheezy|jessie|stretch ]]; then
3938
rpios_recent=1
4039
fi
4140
fi

0 commit comments

Comments
 (0)