#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.2 # Package: LXDE #=========================== # DB commit: 48bb9ee31306c82c48dfaaad707eb4f6a926eb8a # APP commit: 1ca4178aea919e4c9e869e3d650ff8af9678bd6f #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: LXDE" echo "Release: 0.2.2" 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/LXDE/ #Saving start timestamp date +%s > /var/log/ulfs-packages/LXDE/start.time #Going to source directory... cd /sources #Checking dependances... #Checking X... if [ ! -f /var/cache/ulfs-packages/X ]; then echo "Dependance \"X\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/X/install -O - | bash if [ ! -f /var/cache/ulfs-packages/X ]; then echo "Dependance \"X\" is not installed. Exiting..." exit fi fi #Checking lxmenu-data... if [ ! -f /var/cache/ulfs-packages/lxmenu-data ]; then echo "Dependance \"lxmenu-data\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxmenu-data/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxmenu-data ]; then echo "Dependance \"lxmenu-data\" is not installed. Exiting..." exit fi fi #Checking libfm-extra... if [ ! -f /var/cache/ulfs-packages/libfm-extra ]; then echo "Dependance \"libfm-extra\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libfm-extra/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libfm-extra ]; then echo "Dependance \"libfm-extra\" is not installed. Exiting..." exit fi fi #Checking menu-cache... if [ ! -f /var/cache/ulfs-packages/menu-cache ]; then echo "Dependance \"menu-cache\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/menu-cache/install -O - | bash if [ ! -f /var/cache/ulfs-packages/menu-cache ]; then echo "Dependance \"menu-cache\" is not installed. Exiting..." exit fi fi #Checking libfm... if [ ! -f /var/cache/ulfs-packages/libfm ]; then echo "Dependance \"libfm\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libfm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libfm ]; then echo "Dependance \"libfm\" is not installed. Exiting..." exit fi fi #Checking pcmanfm... if [ ! -f /var/cache/ulfs-packages/pcmanfm ]; then echo "Dependance \"pcmanfm\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/pcmanfm/install -O - | bash if [ ! -f /var/cache/ulfs-packages/pcmanfm ]; then echo "Dependance \"pcmanfm\" is not installed. Exiting..." exit fi fi #Checking lxpanel... if [ ! -f /var/cache/ulfs-packages/lxpanel ]; then echo "Dependance \"lxpanel\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxpanel/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxpanel ]; then echo "Dependance \"lxpanel\" is not installed. Exiting..." exit fi fi #Checking lxappearance... if [ ! -f /var/cache/ulfs-packages/lxappearance ]; then echo "Dependance \"lxappearance\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxappearance/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxappearance ]; then echo "Dependance \"lxappearance\" is not installed. Exiting..." exit fi fi #Checking lxsession... if [ ! -f /var/cache/ulfs-packages/lxsession ]; then echo "Dependance \"lxsession\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxsession/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxsession ]; then echo "Dependance \"lxsession\" is not installed. Exiting..." exit fi fi #Checking lxde-common... if [ ! -f /var/cache/ulfs-packages/lxde-common ]; then echo "Dependance \"lxde-common\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxde-common/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxde-common ]; then echo "Dependance \"lxde-common\" is not installed. Exiting..." exit fi fi #Checking gpicview... if [ ! -f /var/cache/ulfs-packages/gpicview ]; then echo "Dependance \"gpicview\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/gpicview/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gpicview ]; then echo "Dependance \"gpicview\" is not installed. Exiting..." exit fi fi #Checking lxappearance-obconf... if [ ! -f /var/cache/ulfs-packages/lxappearance-obconf ]; then echo "Dependance \"lxappearance-obconf\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxappearance-obconf/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxappearance-obconf ]; then echo "Dependance \"lxappearance-obconf\" is not installed. Exiting..." exit fi fi #Checking lxinput... if [ ! -f /var/cache/ulfs-packages/lxinput ]; then echo "Dependance \"lxinput\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxinput/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxinput ]; then echo "Dependance \"lxinput\" is not installed. Exiting..." exit fi fi #Checking lxrandr... if [ ! -f /var/cache/ulfs-packages/lxrandr ]; then echo "Dependance \"lxrandr\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxrandr/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxrandr ]; then echo "Dependance \"lxrandr\" is not installed. Exiting..." exit fi fi #Checking lxtask... if [ ! -f /var/cache/ulfs-packages/lxtask ]; then echo "Dependance \"lxtask\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxtask/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxtask ]; then echo "Dependance \"lxtask\" is not installed. Exiting..." exit fi fi #Checking lxterminal... if [ ! -f /var/cache/ulfs-packages/lxterminal ]; then echo "Dependance \"lxterminal\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lxterminal/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lxterminal ]; then echo "Dependance \"lxterminal\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/LXDE/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/LXDE/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/LXDE/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/LXDE/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/LXDE else sudo touch /var/cache/ulfs-packages/LXDE fi #Calculate prepare time a=`cat /var/log/ulfs-packages/LXDE/start.time` b=`cat /var/log/ulfs-packages/LXDE/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/LXDE/download.time` b=`cat /var/log/ulfs-packages/LXDE/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/LXDE/configure.time` b=`cat /var/log/ulfs-packages/LXDE/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/LXDE/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: LXDE" echo "Release: 0.2.2" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script