Skip to content

Commit a39fe2b

Browse files
committed
add pi 4 check for vara
1 parent 58d03b6 commit a39fe2b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build-a-pi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,21 @@ if [ ${BUT} = 3 ]; then
259259
done
260260
fi
261261

262+
#If vARA is chosen, make sure we have a Pi 4 to work with.
263+
#As of 02OCT2022 the VARA installer only works with the Pi 4.
264+
VARA_CHK=$(grep VARA ${BASE})
265+
if [ -n $VARA_CHK ]; then
266+
FREEMEM=$(free -m | grep Mem: | awk '{ print $2 }')
267+
if [ $FREEMEM -lt 1900 ]; then
268+
echo "Not enough memory available"
269+
yad --form --width=500 --text-align=center --center --title="Build-a-Pi" --text-align=center \
270+
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
271+
--text="<b>Not enough memory</b>\rVARA requires a Pi 4.\r\rVARA will not be installed during the build." \
272+
--button=gtk-ok
273+
sed -i 's/VARA//;/^$/d' ${BASE}
274+
fi
275+
fi
276+
262277
#check if hotspot is chosen for install & get info if needed
263278
HS=$(grep "HOTSPOT" ${BASE})
264279
if [ -n "$HS" ]; then

0 commit comments

Comments
 (0)