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