X-Git-Url: https://mattmccutchen.net/measurements/measurements.git/blobdiff_plain/8aac8f4e2ed12ac90d9a5b91375e0a15631e0cfe..0aa80534d9c4ae90476dcec0ca7d4ccbeb476025:/shell-setup diff --git a/shell-setup b/shell-setup index 357a4f1..9f50e5a 100644 --- a/shell-setup +++ b/shell-setup @@ -1,5 +1,18 @@ # No shebang; it makes no sense to execute this standalone. -export OO=/usr/lib/openoffice.org/basis3.0 -export PATH=$OO/sdk/bin:$PATH -export LD_LIBRARY_PATH=$OO/ure-link/lib +if [ -z "$OOO_BASIS" ]; then + basis="$(echo /usr/lib/openoffice.org/basis*)" + if ! [ -d "$basis" ]; then + echo >&2 "Could not find /usr/lib/openoffice.org/basis* dir." + echo >&2 "Make sure you have the OOo SDK installed." + return 1 + fi + export OOO_BASIS="$basis" + + # One would hope PATH is set, but we'll use the same test for consistency. + export PATH="$OOO_BASIS/sdk/bin:$OOO_BASIS/ure-link/bin${PATH+:${PATH}}" + + # Seems to be no longer needed in OOo 3.1: the executables have the + # library path coded into them. + #export LD_LIBRARY_PATH="$OOO_BASIS/ure-link/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" +fi