#!/bin/bash

version=6.3.0-1

install_packages https://download.anydesk.com/rpi/anydesk_${version}_armhf.deb libgles-dev libegl-dev || exit 1

# Solve error on Bullseye: "anydesk: error while loading shared libraries: libbrcmGLESv2.so: cannot open shared object file: No such file or directory"

[ ! -e /usr/lib/libbrcmGLESv2.so ] && sudo ln -s /usr/lib/arm-linux-gnueabihf/libGLESv2.so /usr/lib/libbrcmGLESv2.so
[ ! -e /usr/lib/libbrcmEGL.so ] && sudo ln -s /usr/lib/arm-linux-gnueabihf/libEGL.so /usr/lib/libbrcmEGL.so
exit 0
