Helper script for parallel installs

From The Document Foundation Wiki
Jump to: navigation, search

If you're using parallel installs of LibreOffice, this script helps you run the program easily, without scribbling-over the settings in your primary user profile.

How to use the Script

Save this text in a file called soffice.sh at the top-level of a LibreOffice install

  • For a GNU+Linux install, this will be at the same level as the DEBS/ or RPMS/ directory
  • On OS X, this will be alongside the Contents/ directory.

Make the script executable:

chmod +x soffice.sh

And run it from the terminal:

./soffice.sh

The Script

#!/bin/bash
#
# Helper script to run the LibreOffice executable in a build.
#  - Robinson Tryon <qubit@runcibility.com>
#  - Miroslaw Zalewski <miniopl@pczta.onet.pl>
#
# This script is handy because it sets up some environmental
# variables, etc.. to make the build run properly and avoid making
# changes to your regular user profile.
#

echo "-----------------------------------------------"
echo "  Welcome to the Wonderful World of Frogs!"
echo "-----------------------------------------------"
echo ""

# Choose a profile directory as the build dir.
#export PROFILE_DIR=$PWD

echo "Starting LibreOffice"

export LIBREOFFICE_BINARY=`find . -name soffice`

#echo $LIBREOFFICE_BINARY
$LIBREOFFICE_BINARY -env:UserInstallation=file:///$PWD &
#$LIBREOFFICE_BINARY


echo "----------------------"
echo "  Helper Script Done"
echo "----------------------"