#copy the directory
PROFILE_PATH="/home/$USER/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/qgis_plugin_dev/python/plugins"
echo "$USER"
echo "$PROFILE_PATH"

if [ -d $PROFILE_PATH/network-store-qgis ]
then
    echo "INFO: Plugin folder exists. Remove it."
    rm -rf $PROFILE_PATH/network-store-qgis
else
    echo "INFO: Directory $PROFILE_PATH does not exists."
fi

cp -r ./../../network-store-qgis $PROFILE_PATH
#rm -rf /home/$USER/.local/share/QGIS/QGIS3/profiles/default/python/plugins/network-store-qgis/.vscode
rm -rf $PROFILE_PATH/network-store-qgis/__pycache__
#start qgis desktop
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=qgis --file-forwarding org.qgis.qgis
