#!/bin/sh

#Create the command which creates a temporary directory
INSTDIR=`mktemp -d -t "userinstall.XXXXXX"`
unopkg sync "-env:BUNDLED_EXTENSIONS_USER=file:///usr/lib64/libreoffice/share/prereg/bundled" "-env:UserInstallation=file://$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=file:///usr/lib64/libreoffice/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
find "/usr/lib64/libreoffice/share/prereg/bundled" -type f -exec chmod 644 {} \;

rm -rf "$INSTDIR"

exit 0
