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