#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.2 # Package: DConf #=========================== # DB commit: f62baf7ba8eded2e302a2eb6b9da5f0cb7e95fef # APP commit: e09dc78145b10de9481608254eb2ac99efd0068b #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: DConf" echo "Release: 0.2.2" downloadFile() { local filename=$1 echo "Downloading $filename ..." if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl -k -O $filename else wget --no-check-certificate -nc $filename fi } echo "loading environment settings(profile)" . /etc/profile 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/DConf/ #Saving start timestamp date +%s > /var/log/ulfs-packages/DConf/start.time #Going to source directory... cd /sources #Checking dependances... #Checking dconf-base... if [ ! -f /var/cache/ulfs-packages/dconf-base ]; then echo "Dependance \"dconf-base\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.2/dconf-base/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/dconf-base/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/dconf-base ]; then echo "Dependance \"dconf-base\" is not installed. Exiting..." exit fi fi #Checking dconf-editor... if [ ! -f /var/cache/ulfs-packages/dconf-editor ]; then echo "Dependance \"dconf-editor\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.2/dconf-editor/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/dconf-editor/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/dconf-editor ]; then echo "Dependance \"dconf-editor\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/DConf/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/DConf/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/DConf/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/DConf/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/DConf else sudo touch /var/cache/ulfs-packages/DConf fi #Calculate prepare time a=`cat /var/log/ulfs-packages/DConf/start.time` b=`cat /var/log/ulfs-packages/DConf/configure.time` dp=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/DConf/configure.time` b=`cat /var/log/ulfs-packages/DConf/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/DConf/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: DConf" echo "Release: 0.2.2" echo "Prepare time: $dp sec." echo "Build time: $db sec." #End of script