#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.2 # Package: Xfonts #=========================== # DB commit: 48bb9ee31306c82c48dfaaad707eb4f6a926eb8a # APP commit: 1ca4178aea919e4c9e869e3d650ff8af9678bd6f #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: Xfonts" 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/Xfonts/ #Saving start timestamp date +%s > /var/log/ulfs-packages/Xfonts/start.time #Going to source directory... cd /sources #Checking dependances... #Checking xcursor-themes... if [ ! -f /var/cache/ulfs-packages/xcursor-themes ]; then echo "Dependance \"xcursor-themes\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xcursor-themes/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcursor-themes ]; then echo "Dependance \"xcursor-themes\" is not installed. Exiting..." exit fi fi #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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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://umvirt.com/linux/packages//0.2.2/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... install -v -d -m755 /usr/share/fonts && ln -svfn \$XORG_PREFIX/share/fonts/X11/OTF /usr/share/fonts/X11-OTF && ln -svfn \$XORG_PREFIX/share/fonts/X11/TTF /usr/share/fonts/X11-TTF #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.2.2" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script