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