diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-21 10:34:09 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-21 10:34:09 +0000 |
commit | bc4fd4e83199fd074759c6cfd61c9916199aa7ee (patch) | |
tree | 491b62d207176cebbb2584c8eaffb553b924a99a /setup_native/scripts/install_linux.sh | |
parent | c8b8e2d8dba0a9870ab6f9c5141ffeb384f46f03 (diff) |
INTEGRATION: CWS sysui03 (1.3.14); FILE MERGED
2005/01/18 12:56:30 obr 1.3.14.2: #i39410# switched back to rpm from environment due to problems on baseline machines
2005/01/14 07:08:52 obr 1.3.14.1: #i39410# check for gnome packages and other enhancements
Diffstat (limited to 'setup_native/scripts/install_linux.sh')
-rw-r--r-- | setup_native/scripts/install_linux.sh | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/setup_native/scripts/install_linux.sh b/setup_native/scripts/install_linux.sh index 1a540a995131..7f7a90e28d82 100644 --- a/setup_native/scripts/install_linux.sh +++ b/setup_native/scripts/install_linux.sh @@ -72,7 +72,7 @@ fi # Check and get the list of packages to install # -RPMLIST=`find $PACKAGE_PATH -type f -name "*.rpm" ! -name "*-core-*" ! -name "*-menus-*" ! -name "adabas*" ! -name "j2re*" -print` +RPMLIST=`find $PACKAGE_PATH -type f -name "*.rpm" ! -name "*-core-*" ! -name "*-menus-*" ! -name "adabas*" ! -name "j2re*" ! -name "*-gnome*" -print` CORERPM=`find $PACKAGE_PATH -type f -name "*.rpm" -name "*-core-*" -print` PREFIX=`rpm -qlp $CORERPM | head -n1` @@ -81,8 +81,19 @@ then error "No core package found in directory $PACKAGE_PATH" fi +# Do not install gnome-integration package on systems without GNOME +# check for /bin/rpm first, otherwise the rpm database is most likly empty anyway +if [ -x /bin/rpm ] +then + /bin/rpm -q gnome-vfs2 >/dev/null + if [ $? -eq 0 ] + then + GNOMERPM=`find $PACKAGE_PATH -type f -name "*.rpm" -name "*-gnome*" -print` + fi +fi + echo "Packages found:" -for i in $CORERPM $RPMLIST; do +for i in $CORERPM $RPMLIST $GNOMERPM; do echo `basename $i` done @@ -101,16 +112,9 @@ then cannot_install "Directory $INSTALLDIR exists and is not empty or cannot be removed" fi -# We expect that $RPM_DB_PATH does not exist, however if it is empty we ignore it -RPM_DB_PATH=$HOME/.RPM_OFFICEDATABASE -if [ -d $RPM_DB_PATH ] -then - rmdir $RPM_DB_PATH -fi -if [ -d $RPM_DB_PATH ] -then - cannot_install "rpm database does already exist $RPM_DB_PATH" -fi +# We expect that rpm_DB_PATH does not exist, however if it is empty we ignore it +#RPM_DB_PATH=$HOME/.RPM_OFFICEDATABASE +RPM_DB_PATH=$INSTALLDIR/.RPM_OFFICEDATABASE # # Perform the installation @@ -125,7 +129,7 @@ echo "Path to the packages: " $PACKAGE_PATH echo "Path to the installation: " $INSTALLDIR # Creating directories -mkdir $RPM_DB_PATH +mkdir -p $RPM_DB_PATH # XXX why ? XXX chmod 700 $RPM_DB_PATH if [ ! -d $RPM_DB_PATH ] @@ -136,8 +140,11 @@ fi # Creating RPM database and initializing rpm --initdb --dbpath $RPM_DB_PATH echo "Installing the RPMs" -rpm --install --nodeps -vh --relocate $PREFIX=$INSTALLDIR --dbpath $RPM_DB_PATH $CORERPM -rpm --install --nodeps -vh --relocate $PREFIX=$INSTALLDIR --dbpath $RPM_DB_PATH $RPMLIST + +# inject a second slash to the last path segment to avoid rpm 3 concatination bug +NEWPREFIX=`echo $INSTALLDIR | sed -e 's|\(.*\)\/\(.*\)|\1\/\/\2|'` +rpm --install --nodeps -vh --relocate $PREFIX=$NEWPREFIX --dbpath $RPM_DB_PATH $CORERPM +rpm --install --nodeps -vh --relocate $PREFIX=$NEWPREFIX --dbpath $RPM_DB_PATH $RPMLIST $GNOMERPM # # Create a link into the users home directory @@ -151,6 +158,10 @@ then ln -s $INSTALLDIR/program/soffice $HOME/soffice fi +# patch the "bootstraprc" to create a self-containing installation +mv $INSTALLDIR/program/bootstraprc $INSTALLDIR/program/bootstraprc.orig +sed 's/UserInstallation=$SYSUSERCONFIG\/.staroffice8/UserInstallation=$ORIGIN\/..\/UserInstallation/g' $INSTALLDIR/program/bootstraprc.orig > $INSTALLDIR/program/bootstraprc + echo echo "Installation done ..." |