echo "---------------------"
cachedir=/var/cache/user/${KDE_SESSION_UID}/arduino15
echo "Cachedir: $cachedir"
echo "---------------------"
template=/var/lib/arduino2/template
arduinoAppimage=/opt/appimages/arduino2/ArduinoIDE2.AppImage

mkdir -p $cachedir

rsync -avr --delete $template/ $cachedir/ > /dev/null 2>&1
rm -rf ${HOME}/.arduino15
ln -s $cachedir ${HOME}/.arduino15

$arduinoAppimage $1 &


