#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.1 # Package: libreoffice #=========================== # DB commit: d35a620850806ab581b32cb34d268a904c9c0a5f # APP commit: 1ca4178aea919e4c9e869e3d650ff8af9678bd6f #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: libreoffice" echo "Release: 0.1" echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi #Creating log directory mkdir -p /var/log/ulfs-packages/libreoffice/ #Saving start timestamp date +%s > /var/log/ulfs-packages/libreoffice/start.time #Going to source directory... cd /sources #Checking dependances... #Checking wget... if [ ! -f /var/cache/ulfs-packages/wget ]; then echo "Dependance \"wget\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/wget/install -O - | bash if [ ! -f /var/cache/ulfs-packages/wget ]; then echo "Dependance \"wget\" is not installed. Exiting..." exit fi fi #Checking mesa... if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/mesa/install -O - | bash if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" is not installed. Exiting..." exit fi fi #Checking curl... if [ ! -f /var/cache/ulfs-packages/curl ]; then echo "Dependance \"curl\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/curl/install -O - | bash if [ ! -f /var/cache/ulfs-packages/curl ]; then echo "Dependance \"curl\" is not installed. Exiting..." exit fi fi #Checking libxml2... if [ ! -f /var/cache/ulfs-packages/libxml2 ]; then echo "Dependance \"libxml2\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/libxml2/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libxml2 ]; then echo "Dependance \"libxml2\" is not installed. Exiting..." exit fi fi #Checking which... if [ ! -f /var/cache/ulfs-packages/which ]; then echo "Dependance \"which\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/which/install -O - | bash if [ ! -f /var/cache/ulfs-packages/which ]; then echo "Dependance \"which\" is not installed. Exiting..." exit fi fi #Checking libjpeg-turbo... if [ ! -f /var/cache/ulfs-packages/libjpeg-turbo ]; then echo "Dependance \"libjpeg-turbo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/libjpeg-turbo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libjpeg-turbo ]; then echo "Dependance \"libjpeg-turbo\" is not installed. Exiting..." exit fi fi #Checking harfbuzz... if [ ! -f /var/cache/ulfs-packages/harfbuzz ]; then echo "Dependance \"harfbuzz\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/harfbuzz/install -O - | bash if [ ! -f /var/cache/ulfs-packages/harfbuzz ]; then echo "Dependance \"harfbuzz\" is not installed. Exiting..." exit fi fi #Checking icu... if [ ! -f /var/cache/ulfs-packages/icu ]; then echo "Dependance \"icu\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/icu/install -O - | bash if [ ! -f /var/cache/ulfs-packages/icu ]; then echo "Dependance \"icu\" is not installed. Exiting..." exit fi fi #Checking gtk3... if [ ! -f /var/cache/ulfs-packages/gtk3 ]; then echo "Dependance \"gtk3\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/gtk3/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gtk3 ]; then echo "Dependance \"gtk3\" is not installed. Exiting..." exit fi fi #Checking libxslt... if [ ! -f /var/cache/ulfs-packages/libxslt ]; then echo "Dependance \"libxslt\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/libxslt/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libxslt ]; then echo "Dependance \"libxslt\" is not installed. Exiting..." exit fi fi #Checking unzip... if [ ! -f /var/cache/ulfs-packages/unzip ]; then echo "Dependance \"unzip\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/unzip/install -O - | bash if [ ! -f /var/cache/ulfs-packages/unzip ]; then echo "Dependance \"unzip\" is not installed. Exiting..." exit fi fi #Checking dbus-glib... if [ ! -f /var/cache/ulfs-packages/dbus-glib ]; then echo "Dependance \"dbus-glib\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/dbus-glib/install -O - | bash if [ ! -f /var/cache/ulfs-packages/dbus-glib ]; then echo "Dependance \"dbus-glib\" is not installed. Exiting..." exit fi fi #Checking zip... if [ ! -f /var/cache/ulfs-packages/zip ]; then echo "Dependance \"zip\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/zip/install -O - | bash if [ ! -f /var/cache/ulfs-packages/zip ]; then echo "Dependance \"zip\" is not installed. Exiting..." exit fi fi #Checking gst-plugins-base... if [ ! -f /var/cache/ulfs-packages/gst-plugins-base ]; then echo "Dependance \"gst-plugins-base\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/gst-plugins-base/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gst-plugins-base ]; then echo "Dependance \"gst-plugins-base\" is not installed. Exiting..." exit fi fi #Checking glu... if [ ! -f /var/cache/ulfs-packages/glu ]; then echo "Dependance \"glu\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/glu/install -O - | bash if [ ! -f /var/cache/ulfs-packages/glu ]; then echo "Dependance \"glu\" is not installed. Exiting..." exit fi fi #Checking nss... if [ ! -f /var/cache/ulfs-packages/nss ]; then echo "Dependance \"nss\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/nss/install -O - | bash if [ ! -f /var/cache/ulfs-packages/nss ]; then echo "Dependance \"nss\" is not installed. Exiting..." exit fi fi #Checking lcms2... if [ ! -f /var/cache/ulfs-packages/lcms2 ]; then echo "Dependance \"lcms2\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/lcms2/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lcms2 ]; then echo "Dependance \"lcms2\" is not installed. Exiting..." exit fi fi #Checking perl-Archive-Zip... if [ ! -f /var/cache/ulfs-packages/perl-Archive-Zip ]; then echo "Dependance \"perl-Archive-Zip\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/perl-Archive-Zip/install -O - | bash if [ ! -f /var/cache/ulfs-packages/perl-Archive-Zip ]; then echo "Dependance \"perl-Archive-Zip\" is not installed. Exiting..." exit fi fi #Checking cupsd... if [ ! -f /var/cache/ulfs-packages/cupsd ]; then echo "Dependance \"cupsd\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/cupsd/install -O - | bash if [ ! -f /var/cache/ulfs-packages/cupsd ]; then echo "Dependance \"cupsd\" is not installed. Exiting..." exit fi fi #Checking poppler... if [ ! -f /var/cache/ulfs-packages/poppler ]; then echo "Dependance \"poppler\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/poppler/install -O - | bash if [ ! -f /var/cache/ulfs-packages/poppler ]; then echo "Dependance \"poppler\" is not installed. Exiting..." exit fi fi #Checking libboost... if [ ! -f /var/cache/ulfs-packages/libboost ]; then echo "Dependance \"libboost\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/libboost/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libboost ]; then echo "Dependance \"libboost\" is not installed. Exiting..." exit fi fi #Checking libatomic_ops... if [ ! -f /var/cache/ulfs-packages/libatomic_ops ]; then echo "Dependance \"libatomic_ops\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/libatomic_ops/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libatomic_ops ]; then echo "Dependance \"libatomic_ops\" is not installed. Exiting..." exit fi fi #Checking python-lxml... if [ ! -f /var/cache/ulfs-packages/python-lxml ]; then echo "Dependance \"python-lxml\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/python-lxml/install -O - | bash if [ ! -f /var/cache/ulfs-packages/python-lxml ]; then echo "Dependance \"python-lxml\" is not installed. Exiting..." exit fi fi #Checking neon... if [ ! -f /var/cache/ulfs-packages/neon ]; then echo "Dependance \"neon\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/neon/install -O - | bash if [ ! -f /var/cache/ulfs-packages/neon ]; then echo "Dependance \"neon\" is not installed. Exiting..." exit fi fi #Checking apache-ant... if [ ! -f /var/cache/ulfs-packages/apache-ant ]; then echo "Dependance \"apache-ant\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/apache-ant/install -O - | bash if [ ! -f /var/cache/ulfs-packages/apache-ant ]; then echo "Dependance \"apache-ant\" is not installed. Exiting..." exit fi fi #Checking apr... if [ ! -f /var/cache/ulfs-packages/apr ]; then echo "Dependance \"apr\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/apr/install -O - | bash if [ ! -f /var/cache/ulfs-packages/apr ]; then echo "Dependance \"apr\" is not installed. Exiting..." exit fi fi #Checking clucene... if [ ! -f /var/cache/ulfs-packages/clucene ]; then echo "Dependance \"clucene\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/clucene/install -O - | bash if [ ! -f /var/cache/ulfs-packages/clucene ]; then echo "Dependance \"clucene\" is not installed. Exiting..." exit fi fi #Checking graphite2... if [ ! -f /var/cache/ulfs-packages/graphite2 ]; then echo "Dependance \"graphite2\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/graphite2/install -O - | bash if [ ! -f /var/cache/ulfs-packages/graphite2 ]; then echo "Dependance \"graphite2\" is not installed. Exiting..." exit fi fi #Checking openldap-client... if [ ! -f /var/cache/ulfs-packages/openldap-client ]; then echo "Dependance \"openldap-client\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/openldap-client/install -O - | bash if [ ! -f /var/cache/ulfs-packages/openldap-client ]; then echo "Dependance \"openldap-client\" is not installed. Exiting..." exit fi fi #Checking postgresql-client... if [ ! -f /var/cache/ulfs-packages/postgresql-client ]; then echo "Dependance \"postgresql-client\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/postgresql-client/install -O - | bash if [ ! -f /var/cache/ulfs-packages/postgresql-client ]; then echo "Dependance \"postgresql-client\" is not installed. Exiting..." exit fi fi #Checking unixODBC... if [ ! -f /var/cache/ulfs-packages/unixODBC ]; then echo "Dependance \"unixODBC\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/unixODBC/install -O - | bash if [ ! -f /var/cache/ulfs-packages/unixODBC ]; then echo "Dependance \"unixODBC\" is not installed. Exiting..." exit fi fi #Checking redland... if [ ! -f /var/cache/ulfs-packages/redland ]; then echo "Dependance \"redland\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/redland/install -O - | bash if [ ! -f /var/cache/ulfs-packages/redland ]; then echo "Dependance \"redland\" is not installed. Exiting..." exit fi fi #Checking sudo... if [ ! -f /var/cache/ulfs-packages/sudo ]; then echo "Dependance \"sudo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.1/sudo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/sudo ]; then echo "Dependance \"sudo\" is not installed. Exiting..." exit fi fi #Saving downloading timestamp date +%s > /var/log/ulfs-packages/libreoffice/download.time #Downloading source package archive... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-6.1.0.3.tar.xz.md5sum wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-6.1.0.3.tar.xz #Checking source package file existance if [ ! -f libreoffice-6.1.0.3.tar.xz ]; then echo "Error: Can't find libreoffice-6.1.0.3.tar.xz. Exiting!" exit fi #Checking source package file checksum if [ -f libreoffice-6.1.0.3.tar.xz.md5sum ]; then MD5=`LANG=C md5sum -c libreoffice-6.1.0.3.tar.xz.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of libreoffice-6.1.0.3.tar.xz is wrong. Exiting!" exit fi fi #Downloadning add-ons... #Downloadning add-on "libreoffice-dictionaries-6.1.0.3.tar.xz"... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-dictionaries-6.1.0.3.tar.xz.md5sum wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-dictionaries-6.1.0.3.tar.xz #Checking addon file existance if [ ! -f libreoffice-dictionaries-6.1.0.3.tar.xz ]; then echo "Error: Can't find libreoffice-dictionaries-6.1.0.3.tar.xz. Exiting!" exit fi #Checking add-on file checksum if [ -f libreoffice-dictionaries-6.1.0.3.tar.xz.md5sum ]; then MD5=`LANG=C md5sum -c libreoffice-dictionaries-6.1.0.3.tar.xz.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of libreoffice-dictionaries-6.1.0.3.tar.xz is wrong. Exiting!" exit fi fi #Downloadning add-on "libreoffice-help-6.1.0.3.tar.xz"... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-help-6.1.0.3.tar.xz.md5sum wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-help-6.1.0.3.tar.xz #Checking addon file existance if [ ! -f libreoffice-help-6.1.0.3.tar.xz ]; then echo "Error: Can't find libreoffice-help-6.1.0.3.tar.xz. Exiting!" exit fi #Checking add-on file checksum if [ -f libreoffice-help-6.1.0.3.tar.xz.md5sum ]; then MD5=`LANG=C md5sum -c libreoffice-help-6.1.0.3.tar.xz.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of libreoffice-help-6.1.0.3.tar.xz is wrong. Exiting!" exit fi fi #Downloadning add-on "libreoffice-translations-6.1.0.3.tar.xz"... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-translations-6.1.0.3.tar.xz.md5sum wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-translations-6.1.0.3.tar.xz #Checking addon file existance if [ ! -f libreoffice-translations-6.1.0.3.tar.xz ]; then echo "Error: Can't find libreoffice-translations-6.1.0.3.tar.xz. Exiting!" exit fi #Checking add-on file checksum if [ -f libreoffice-translations-6.1.0.3.tar.xz.md5sum ]; then MD5=`LANG=C md5sum -c libreoffice-translations-6.1.0.3.tar.xz.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of libreoffice-translations-6.1.0.3.tar.xz is wrong. Exiting!" exit fi fi #Downloadning add-on "libreoffice-extratars-6.1.0.3.tar"... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-extratars-6.1.0.3.tar.md5sum wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/packages/l/libreoffice-extratars-6.1.0.3.tar #Checking addon file existance if [ ! -f libreoffice-extratars-6.1.0.3.tar ]; then echo "Error: Can't find libreoffice-extratars-6.1.0.3.tar. Exiting!" exit fi #Checking add-on file checksum if [ -f libreoffice-extratars-6.1.0.3.tar.md5sum ]; then MD5=`LANG=C md5sum -c libreoffice-extratars-6.1.0.3.tar.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of libreoffice-extratars-6.1.0.3.tar is wrong. Exiting!" exit fi fi #Downloadning patches... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.1/patches/libreoffice-6.1.4.2-jdk11_fixes-1.patch #Saving cleanup timestamp date +%s > /var/log/ulfs-packages/libreoffice/cleanup.time rm -rfv /sources/libreoffice-6.1.0.3/ #Saving extracting timestamp date +%s > /var/log/ulfs-packages/libreoffice/unpack.time #Extracting source package with previously defined commands... tar -xf libreoffice-6.1.0.3.tar.xz --no-overwrite-dir #Checking package directory size after unpack... du -s libreoffice-6.1.0.3 | awk 'NR==1 {print $1}' > /var/log/ulfs-packages/libreoffice/unpack.size #Going to source package directory... cd libreoffice-6.1.0.3 #Applying patches... patch -Np -i ../libreoffice-6.1.4.2-jdk11_fixes-1.patch #Saving configuration timestamp date +%s > /var/log/ulfs-packages/libreoffice/configure.time #Sleep 1 second sleep 1 #Running configuration script... export LO_PREFIX=/opt/libreooffice-6.1.0.3 install -dm755 external/tarballs && ln -sv ../../../libreoffice-dictionaries-6.1.0.3.tar.xz external/tarballs/ && ln -sv ../../../libreoffice-help-6.1.0.3.tar.xz external/tarballs/ ln -sv ../../../libreoffice-translations-6.1.0.3.tar.xz external/tarballs/ tar -xf ../libreoffice-extratars-6.1.0.3.tar cp -v libreoffice-extratars-6.1.0.3/* external/tarballs/ sed -e "/gzip -f/d" \ -e "s|.1.gz|.1|g" \ -i bin/distro-install-desktop-integration && sed -e "/distro-install-file-lists/d" -i Makefile.in && ./autogen.sh --prefix=\$LO_PREFIX \ --sysconfdir=/etc \ --with-vendor=BLFS \ --with-lang='ru fr en-GB' \ --with-help \ --with-myspell-dicts \ --with-alloc=system \ --without-junit \ --without-system-dicts \ --disable-dconf \ --disable-odk \ --enable-release-build=yes \ --enable-python=system \ --with-system-apr \ --with-system-boost \ --with-system-cairo \ --with-system-clucene \ --with-system-curl \ --with-system-expat \ --with-system-graphite \ --with-system-harfbuzz \ --with-system-icu \ --with-system-jpeg \ --with-system-lcms2 \ --with-system-libatomic_ops \ --with-system-libpng \ --with-system-libxml \ --with-system-neon \ --with-system-nss \ --with-system-odbc \ --with-system-openldap \ --with-system-openssl \ --with-system-poppler \ --with-system-postgresql \ --with-system-redland \ --with-system-serf \ --with-system-zlib \ --with-jdk-home=/opt/jdk #Saving build timestamp date +%s > /var/log/ulfs-packages/libreoffice/build.time #Running build script... CPPFLAGS='-DU_USING_ICU_NAMESPACE=1' make build-nocheck #Saving install timestamp date +%s > /var/log/ulfs-packages/libreoffice/install.time #Running install script... cat > ulfs_install.sh << EOIS export LO_PREFIX=/opt/libreooffice-6.1.0.3 make distro-pack-install if [ "\$LO_PREFIX" != "/usr" ]; then # This symlink is necessary for the desktop menu entries ln -svf \$LO_PREFIX/lib/libreoffice/program/soffice /usr/bin/libreoffice && # Set up a generic location independent of version number ln -sfv \$LO_PREFIX /opt/libreoffice # Icons mkdir -vp /usr/share/pixmaps for i in \$LO_PREFIX/share/icons/hicolor/32x32/apps/*; do ln -svf \$i /usr/share/pixmaps done && # Desktop menu entries for i in \$LO_PREFIX/lib/libreoffice/share/xdg/*; do ln -svf \$i /usr/share/applications/libreoffice-\$(basename \$i) done && # Man pages for i in \$LO_PREFIX/share/man/man1/*; do ln -svf \$i /usr/share/man/man1/ done unset i fi update-desktop-database EOIS USER=`whoami` if [ "$USER" == "root" ] ; then cat ulfs_install.sh | bash 2>&1 | tee /var/log/ulfs-packages/libreoffice/install.log else cat ulfs_install.sh | sudo bash 2>&1 | tee /var/log/ulfs-packages/libreoffice/install.log fi #Saving finish timestamp date +%s > /var/log/ulfs-packages/libreoffice/finish.time #Checking package directory size after unpack... cd /sources du -s libreoffice-6.1.0.3 | awk 'NR==1 {print $1}' > /var/log/ulfs-packages/libreoffice/install.size echo "ULFS package installation completed." #Producing files list echo "Looking for installed files..." if [ -f /var/log/ulfs-packages/libreoffice/files.txt ]; then rm /var/log/ulfs-packages/libreoffice/files.txt fi USER=`whoami` if [ "$USER" == "root" ] ; then find /bin -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /sbin -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /usr -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /etc -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /opt -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /lib -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /lib64 -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt find /var -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time \! -path "/var/log/ulfs-packages/libreoffice/*" >> /var/log/ulfs-packages/libreoffice/files.txt else sudo find /bin -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /sbin -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /usr -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /etc -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /opt -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /lib -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /lib64 -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time >> /var/log/ulfs-packages/libreoffice/files.txt sudo find /var -type f -newer /var/log/ulfs-packages/libreoffice/configure.time \! -newer /var/log/ulfs-packages/libreoffice/finish.time \! -path "/var/log/ulfs-packages/libreoffice/*" >> /var/log/ulfs-packages/libreoffice/files.txt fi #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/libreoffice else sudo touch /var/cache/ulfs-packages/libreoffice fi #Calculate delta size a=`cat /var/log/ulfs-packages/libreoffice/unpack.size` b=`cat /var/log/ulfs-packages/libreoffice/install.size` c=$(($b-$a)) echo $c > /var/log/ulfs-packages/libreoffice/delta.size #Calculate prepare time a=`cat /var/log/ulfs-packages/libreoffice/start.time` b=`cat /var/log/ulfs-packages/libreoffice/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/libreoffice/download.time` b=`cat /var/log/ulfs-packages/libreoffice/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/libreoffice/configure.time` b=`cat /var/log/ulfs-packages/libreoffice/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/libreoffice/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: libreoffice" echo "Release: 0.1" echo "Build size: $c" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script