#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 4145625122 # Package: X #=========================== # DB commit: c9dd8835b9e79548f70e25c8ffb9d09430f622a0 # APP commit: #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: X" 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/X/ #Saving start timestamp date +%s > /var/log/ulfs-packages/X/start.time #Going to source directory... cd /sources #Checking dependances... #Checking libXau... if [ ! -f /var/cache/ulfs-packages/libXau ]; then echo "Dependance \"libXau\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXau/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXau ]; then echo "Dependance \"libXau\" is not installed. Exiting..." exit fi fi #Checking libXdmcp... if [ ! -f /var/cache/ulfs-packages/libXdmcp ]; then echo "Dependance \"libXdmcp\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/libXdmcp/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libXdmcp ]; then echo "Dependance \"libXdmcp\" is not installed. Exiting..." exit fi fi #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 Xlibs... if [ ! -f /var/cache/ulfs-packages/Xlibs ]; then echo "Dependance \"Xlibs\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/Xlibs/install -O - | bash if [ ! -f /var/cache/ulfs-packages/Xlibs ]; then echo "Dependance \"Xlibs\" is not installed. Exiting..." exit fi fi #Checking xcb-util... if [ ! -f /var/cache/ulfs-packages/xcb-util ]; then echo "Dependance \"xcb-util\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xcb-util/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util ]; then echo "Dependance \"xcb-util\" is not installed. Exiting..." exit fi fi #Checking xcb-util-image... if [ ! -f /var/cache/ulfs-packages/xcb-util-image ]; then echo "Dependance \"xcb-util-image\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xcb-util-image/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util-image ]; then echo "Dependance \"xcb-util-image\" is not installed. Exiting..." exit fi fi #Checking xcb-util-keysyms... if [ ! -f /var/cache/ulfs-packages/xcb-util-keysyms ]; then echo "Dependance \"xcb-util-keysyms\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xcb-util-keysyms/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util-keysyms ]; then echo "Dependance \"xcb-util-keysyms\" is not installed. Exiting..." exit fi fi #Checking xcb-util-renderutil... if [ ! -f /var/cache/ulfs-packages/xcb-util-renderutil ]; then echo "Dependance \"xcb-util-renderutil\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xcb-util-renderutil/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util-renderutil ]; then echo "Dependance \"xcb-util-renderutil\" is not installed. Exiting..." exit fi fi #Checking xcb-util-wm... if [ ! -f /var/cache/ulfs-packages/xcb-util-wm ]; then echo "Dependance \"xcb-util-wm\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xcb-util-wm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util-wm ]; then echo "Dependance \"xcb-util-wm\" is not installed. Exiting..." exit fi fi #Checking xcb-util-cursor... if [ ! -f /var/cache/ulfs-packages/xcb-util-cursor ]; then echo "Dependance \"xcb-util-cursor\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xcb-util-cursor/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util-cursor ]; then echo "Dependance \"xcb-util-cursor\" 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://ulfs.org/linux/packages//4145625122/mesa/install -O - | bash if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" is not installed. Exiting..." exit fi fi #Checking Xapps... if [ ! -f /var/cache/ulfs-packages/Xapps ]; then echo "Dependance \"Xapps\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/Xapps/install -O - | bash if [ ! -f /var/cache/ulfs-packages/Xapps ]; then echo "Dependance \"Xapps\" is not installed. Exiting..." exit fi fi #Checking Xfonts... if [ ! -f /var/cache/ulfs-packages/Xfonts ]; then echo "Dependance \"Xfonts\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/Xfonts/install -O - | bash if [ ! -f /var/cache/ulfs-packages/Xfonts ]; then echo "Dependance \"Xfonts\" is not installed. Exiting..." exit fi fi #Checking xkeyboard-config... if [ ! -f /var/cache/ulfs-packages/xkeyboard-config ]; then echo "Dependance \"xkeyboard-config\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xkeyboard-config/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xkeyboard-config ]; then echo "Dependance \"xkeyboard-config\" is not installed. Exiting..." exit fi fi #Checking xwayland... if [ ! -f /var/cache/ulfs-packages/xwayland ]; then echo "Dependance \"xwayland\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xwayland/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xwayland ]; then echo "Dependance \"xwayland\" is not installed. Exiting..." exit fi fi #Checking xorg-server... if [ ! -f /var/cache/ulfs-packages/xorg-server ]; then echo "Dependance \"xorg-server\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xorg-server/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xorg-server ]; then echo "Dependance \"xorg-server\" is not installed. Exiting..." exit fi fi #Checking xterm... if [ ! -f /var/cache/ulfs-packages/xterm ]; then echo "Dependance \"xterm\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xterm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xterm ]; then echo "Dependance \"xterm\" is not installed. Exiting..." exit fi fi #Checking xclock... if [ ! -f /var/cache/ulfs-packages/xclock ]; then echo "Dependance \"xclock\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xclock/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xclock ]; then echo "Dependance \"xclock\" is not installed. Exiting..." exit fi fi #Checking xinit... if [ ! -f /var/cache/ulfs-packages/xinit ]; then echo "Dependance \"xinit\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/xinit/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xinit ]; then echo "Dependance \"xinit\" is not installed. Exiting..." exit fi fi #Checking Xdrivers... if [ ! -f /var/cache/ulfs-packages/Xdrivers ]; then echo "Dependance \"Xdrivers\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/Xdrivers/install -O - | bash if [ ! -f /var/cache/ulfs-packages/Xdrivers ]; then echo "Dependance \"Xdrivers\" is not installed. Exiting..." exit fi fi #Checking twm... if [ ! -f /var/cache/ulfs-packages/twm ]; then echo "Dependance \"twm\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//4145625122/twm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/twm ]; then echo "Dependance \"twm\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/X/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/X/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/X/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/X/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/X else sudo touch /var/cache/ulfs-packages/X fi #Calculate prepare time a=`cat /var/log/ulfs-packages/X/start.time` b=`cat /var/log/ulfs-packages/X/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/X/download.time` b=`cat /var/log/ulfs-packages/X/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/X/configure.time` b=`cat /var/log/ulfs-packages/X/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/X/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: X" echo "Release: 4145625122" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script