#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 4145625122 # Package: Xlibs #=========================== # DB commit: c9dd8835b9e79548f70e25c8ffb9d09430f622a0 # APP commit: #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: Xlibs" echo "Release: 4145625122" 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/Xlibs/ #Saving start timestamp date +%s > /var/log/ulfs-packages/Xlibs/start.time #Going to source directory... cd /sources #Checking dependances... #Checking libxcb... if [ ! -f /var/cache/ulfs-packages/libxcb ]; then echo "Dependance \"libxcb\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libxcb/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libxcb ]; then echo "Dependance \"libxcb\" is not installed. Exiting..." exit fi fi #Checking fontconfig... if [ ! -f /var/cache/ulfs-packages/fontconfig ]; then echo "Dependance \"fontconfig\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/fontconfig/install -O - | bash if [ ! -f /var/cache/ulfs-packages/fontconfig ]; then echo "Dependance \"fontconfig\" is not installed. Exiting..." exit fi fi #Checking xtrans... if [ ! -f /var/cache/ulfs-packages/xtrans ]; then echo "Dependance \"xtrans\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xtrans/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xtrans ]; then echo "Dependance \"xtrans\" is not installed. Exiting..." exit fi fi #Checking libX11... if [ ! -f /var/cache/ulfs-packages/libX11 ]; then echo "Dependance \"libX11\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libX11/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libX11 ]; then echo "Dependance \"libX11\" is not installed. Exiting..." exit fi fi #Checking libXext... if [ ! -f /var/cache/ulfs-packages/libXext ]; then echo "Dependance \"libXext\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXext/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXext ]; then echo "Dependance \"libXext\" is not installed. Exiting..." exit fi fi #Checking libFS... if [ ! -f /var/cache/ulfs-packages/libFS ]; then echo "Dependance \"libFS\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libFS/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libFS ]; then echo "Dependance \"libFS\" is not installed. Exiting..." exit fi fi #Checking libICE... if [ ! -f /var/cache/ulfs-packages/libICE ]; then echo "Dependance \"libICE\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libICE/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libICE ]; then echo "Dependance \"libICE\" is not installed. Exiting..." exit fi fi #Checking libSM... if [ ! -f /var/cache/ulfs-packages/libSM ]; then echo "Dependance \"libSM\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libSM/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libSM ]; then echo "Dependance \"libSM\" is not installed. Exiting..." exit fi fi #Checking libXScrnSaver... if [ ! -f /var/cache/ulfs-packages/libXScrnSaver ]; then echo "Dependance \"libXScrnSaver\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXScrnSaver/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXScrnSaver ]; then echo "Dependance \"libXScrnSaver\" is not installed. Exiting..." exit fi fi #Checking libXt... if [ ! -f /var/cache/ulfs-packages/libXt ]; then echo "Dependance \"libXt\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXt/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXt ]; then echo "Dependance \"libXt\" is not installed. Exiting..." exit fi fi #Checking libXmu... if [ ! -f /var/cache/ulfs-packages/libXmu ]; then echo "Dependance \"libXmu\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXmu/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXmu ]; then echo "Dependance \"libXmu\" is not installed. Exiting..." exit fi fi #Checking libXpm... if [ ! -f /var/cache/ulfs-packages/libXpm ]; then echo "Dependance \"libXpm\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXpm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXpm ]; then echo "Dependance \"libXpm\" is not installed. Exiting..." exit fi fi #Checking libXaw... if [ ! -f /var/cache/ulfs-packages/libXaw ]; then echo "Dependance \"libXaw\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXaw/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXaw ]; then echo "Dependance \"libXaw\" is not installed. Exiting..." exit fi fi #Checking libXfixes... if [ ! -f /var/cache/ulfs-packages/libXfixes ]; then echo "Dependance \"libXfixes\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXfixes/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXfixes ]; then echo "Dependance \"libXfixes\" is not installed. Exiting..." exit fi fi #Checking libXcomposite... if [ ! -f /var/cache/ulfs-packages/libXcomposite ]; then echo "Dependance \"libXcomposite\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXcomposite/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXcomposite ]; then echo "Dependance \"libXcomposite\" is not installed. Exiting..." exit fi fi #Checking libXrender... if [ ! -f /var/cache/ulfs-packages/libXrender ]; then echo "Dependance \"libXrender\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXrender/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXrender ]; then echo "Dependance \"libXrender\" is not installed. Exiting..." exit fi fi #Checking libXcursor... if [ ! -f /var/cache/ulfs-packages/libXcursor ]; then echo "Dependance \"libXcursor\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXcursor/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXcursor ]; then echo "Dependance \"libXcursor\" is not installed. Exiting..." exit fi fi #Checking libXdamage... if [ ! -f /var/cache/ulfs-packages/libXdamage ]; then echo "Dependance \"libXdamage\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXdamage/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXdamage ]; then echo "Dependance \"libXdamage\" is not installed. Exiting..." exit fi fi #Checking libfontenc... if [ ! -f /var/cache/ulfs-packages/libfontenc ]; then echo "Dependance \"libfontenc\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libfontenc/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libfontenc ]; then echo "Dependance \"libfontenc\" is not installed. Exiting..." exit fi fi #Checking libXfont2... if [ ! -f /var/cache/ulfs-packages/libXfont2 ]; then echo "Dependance \"libXfont2\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXfont2/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXfont2 ]; then echo "Dependance \"libXfont2\" is not installed. Exiting..." exit fi fi #Checking libXft... if [ ! -f /var/cache/ulfs-packages/libXft ]; then echo "Dependance \"libXft\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXft/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXft ]; then echo "Dependance \"libXft\" is not installed. Exiting..." exit fi fi #Checking libXi... if [ ! -f /var/cache/ulfs-packages/libXi ]; then echo "Dependance \"libXi\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXi/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXi ]; then echo "Dependance \"libXi\" is not installed. Exiting..." exit fi fi #Checking libXinerama... if [ ! -f /var/cache/ulfs-packages/libXinerama ]; then echo "Dependance \"libXinerama\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXinerama/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXinerama ]; then echo "Dependance \"libXinerama\" is not installed. Exiting..." exit fi fi #Checking libXrandr... if [ ! -f /var/cache/ulfs-packages/libXrandr ]; then echo "Dependance \"libXrandr\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXrandr/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXrandr ]; then echo "Dependance \"libXrandr\" is not installed. Exiting..." exit fi fi #Checking libXres... if [ ! -f /var/cache/ulfs-packages/libXres ]; then echo "Dependance \"libXres\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXres/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXres ]; then echo "Dependance \"libXres\" is not installed. Exiting..." exit fi fi #Checking libXtst... if [ ! -f /var/cache/ulfs-packages/libXtst ]; then echo "Dependance \"libXtst\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXtst/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXtst ]; then echo "Dependance \"libXtst\" is not installed. Exiting..." exit fi fi #Checking libXv... if [ ! -f /var/cache/ulfs-packages/libXv ]; then echo "Dependance \"libXv\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXv/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXv ]; then echo "Dependance \"libXv\" is not installed. Exiting..." exit fi fi #Checking libXvMC... if [ ! -f /var/cache/ulfs-packages/libXvMC ]; then echo "Dependance \"libXvMC\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXvMC/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXvMC ]; then echo "Dependance \"libXvMC\" is not installed. Exiting..." exit fi fi #Checking libXxf86dga... if [ ! -f /var/cache/ulfs-packages/libXxf86dga ]; then echo "Dependance \"libXxf86dga\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXxf86dga/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXxf86dga ]; then echo "Dependance \"libXxf86dga\" is not installed. Exiting..." exit fi fi #Checking libXxf86vm... if [ ! -f /var/cache/ulfs-packages/libXxf86vm ]; then echo "Dependance \"libXxf86vm\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXxf86vm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXxf86vm ]; then echo "Dependance \"libXxf86vm\" is not installed. Exiting..." exit fi fi #Checking libpciaccess... if [ ! -f /var/cache/ulfs-packages/libpciaccess ]; then echo "Dependance \"libpciaccess\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libpciaccess/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libpciaccess ]; then echo "Dependance \"libpciaccess\" is not installed. Exiting..." exit fi fi #Checking libxkbfile... if [ ! -f /var/cache/ulfs-packages/libxkbfile ]; then echo "Dependance \"libxkbfile\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libxkbfile/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libxkbfile ]; then echo "Dependance \"libxkbfile\" is not installed. Exiting..." exit fi fi #Checking libxshmfence... if [ ! -f /var/cache/ulfs-packages/libxshmfence ]; then echo "Dependance \"libxshmfence\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libxshmfence/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libxshmfence ]; then echo "Dependance \"libxshmfence\" is not installed. Exiting..." exit fi fi #Checking libXpresent... if [ ! -f /var/cache/ulfs-packages/libXpresent ]; then echo "Dependance \"libXpresent\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXpresent/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXpresent ]; then echo "Dependance \"libXpresent\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/Xlibs/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/Xlibs/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/Xlibs/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/Xlibs/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/Xlibs else sudo touch /var/cache/ulfs-packages/Xlibs fi #Calculate prepare time a=`cat /var/log/ulfs-packages/Xlibs/start.time` b=`cat /var/log/ulfs-packages/Xlibs/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/Xlibs/download.time` b=`cat /var/log/ulfs-packages/Xlibs/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/Xlibs/configure.time` b=`cat /var/log/ulfs-packages/Xlibs/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/Xlibs/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: Xlibs" echo "Release: 4145625122" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script