#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.2 # Package: Xapps #=========================== # DB commit: 48bb9ee31306c82c48dfaaad707eb4f6a926eb8a # APP commit: 1ca4178aea919e4c9e869e3d650ff8af9678bd6f #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: Xapps" 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/Xapps/ #Saving start timestamp date +%s > /var/log/ulfs-packages/Xapps/start.time #Going to source directory... cd /sources #Checking dependances... #Checking xcb-util... if [ ! -f /var/cache/ulfs-packages/xcb-util ]; then echo "Dependance \"xcb-util\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xcb-util/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcb-util ]; then echo "Dependance \"xcb-util\" is not installed. Exiting..." exit fi fi #Checking mesa... if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/mesa/install -O - | bash if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" is not installed. Exiting..." exit fi fi #Checking xbitmaps... if [ ! -f /var/cache/ulfs-packages/xbitmaps ]; then echo "Dependance \"xbitmaps\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xbitmaps/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xbitmaps ]; then echo "Dependance \"xbitmaps\" is not installed. Exiting..." exit fi fi #Checking libpng... if [ ! -f /var/cache/ulfs-packages/libpng ]; then echo "Dependance \"libpng\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libpng/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libpng ]; then echo "Dependance \"libpng\" is not installed. Exiting..." exit fi fi #Checking iceauth... if [ ! -f /var/cache/ulfs-packages/iceauth ]; then echo "Dependance \"iceauth\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/iceauth/install -O - | bash if [ ! -f /var/cache/ulfs-packages/iceauth ]; then echo "Dependance \"iceauth\" is not installed. Exiting..." exit fi fi #Checking luit... if [ ! -f /var/cache/ulfs-packages/luit ]; then echo "Dependance \"luit\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/luit/install -O - | bash if [ ! -f /var/cache/ulfs-packages/luit ]; then echo "Dependance \"luit\" is not installed. Exiting..." exit fi fi #Checking mkfontscale... if [ ! -f /var/cache/ulfs-packages/mkfontscale ]; then echo "Dependance \"mkfontscale\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/mkfontscale/install -O - | bash if [ ! -f /var/cache/ulfs-packages/mkfontscale ]; then echo "Dependance \"mkfontscale\" is not installed. Exiting..." exit fi fi #Checking sessreg... if [ ! -f /var/cache/ulfs-packages/sessreg ]; then echo "Dependance \"sessreg\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/sessreg/install -O - | bash if [ ! -f /var/cache/ulfs-packages/sessreg ]; then echo "Dependance \"sessreg\" is not installed. Exiting..." exit fi fi #Checking setxkbmap... if [ ! -f /var/cache/ulfs-packages/setxkbmap ]; then echo "Dependance \"setxkbmap\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/setxkbmap/install -O - | bash if [ ! -f /var/cache/ulfs-packages/setxkbmap ]; then echo "Dependance \"setxkbmap\" is not installed. Exiting..." exit fi fi #Checking smproxy... if [ ! -f /var/cache/ulfs-packages/smproxy ]; then echo "Dependance \"smproxy\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/smproxy/install -O - | bash if [ ! -f /var/cache/ulfs-packages/smproxy ]; then echo "Dependance \"smproxy\" is not installed. Exiting..." exit fi fi #Checking x11perf... if [ ! -f /var/cache/ulfs-packages/x11perf ]; then echo "Dependance \"x11perf\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/x11perf/install -O - | bash if [ ! -f /var/cache/ulfs-packages/x11perf ]; then echo "Dependance \"x11perf\" is not installed. Exiting..." exit fi fi #Checking xauth... if [ ! -f /var/cache/ulfs-packages/xauth ]; then echo "Dependance \"xauth\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xauth/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xauth ]; then echo "Dependance \"xauth\" is not installed. Exiting..." exit fi fi #Checking xcmsdb... if [ ! -f /var/cache/ulfs-packages/xcmsdb ]; then echo "Dependance \"xcmsdb\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xcmsdb/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcmsdb ]; then echo "Dependance \"xcmsdb\" is not installed. Exiting..." exit fi fi #Checking xcursorgen... if [ ! -f /var/cache/ulfs-packages/xcursorgen ]; then echo "Dependance \"xcursorgen\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xcursorgen/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xcursorgen ]; then echo "Dependance \"xcursorgen\" is not installed. Exiting..." exit fi fi #Checking xdpyinfo... if [ ! -f /var/cache/ulfs-packages/xdpyinfo ]; then echo "Dependance \"xdpyinfo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xdpyinfo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xdpyinfo ]; then echo "Dependance \"xdpyinfo\" is not installed. Exiting..." exit fi fi #Checking xdriinfo... if [ ! -f /var/cache/ulfs-packages/xdriinfo ]; then echo "Dependance \"xdriinfo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xdriinfo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xdriinfo ]; then echo "Dependance \"xdriinfo\" is not installed. Exiting..." exit fi fi #Checking xev... if [ ! -f /var/cache/ulfs-packages/xev ]; then echo "Dependance \"xev\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xev/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xev ]; then echo "Dependance \"xev\" is not installed. Exiting..." exit fi fi #Checking xgamma... if [ ! -f /var/cache/ulfs-packages/xgamma ]; then echo "Dependance \"xgamma\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xgamma/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xgamma ]; then echo "Dependance \"xgamma\" is not installed. Exiting..." exit fi fi #Checking xhost... if [ ! -f /var/cache/ulfs-packages/xhost ]; then echo "Dependance \"xhost\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xhost/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xhost ]; then echo "Dependance \"xhost\" is not installed. Exiting..." exit fi fi #Checking xinput... if [ ! -f /var/cache/ulfs-packages/xinput ]; then echo "Dependance \"xinput\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xinput/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xinput ]; then echo "Dependance \"xinput\" is not installed. Exiting..." exit fi fi #Checking xkbcomp... if [ ! -f /var/cache/ulfs-packages/xkbcomp ]; then echo "Dependance \"xkbcomp\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xkbcomp/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xkbcomp ]; then echo "Dependance \"xkbcomp\" is not installed. Exiting..." exit fi fi #Checking xkbevd... if [ ! -f /var/cache/ulfs-packages/xkbevd ]; then echo "Dependance \"xkbevd\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xkbevd/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xkbevd ]; then echo "Dependance \"xkbevd\" is not installed. Exiting..." exit fi fi #Checking xkbutils... if [ ! -f /var/cache/ulfs-packages/xkbutils ]; then echo "Dependance \"xkbutils\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xkbutils/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xkbutils ]; then echo "Dependance \"xkbutils\" is not installed. Exiting..." exit fi fi #Checking xkill... if [ ! -f /var/cache/ulfs-packages/xkill ]; then echo "Dependance \"xkill\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xkill/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xkill ]; then echo "Dependance \"xkill\" is not installed. Exiting..." exit fi fi #Checking xlsatoms... if [ ! -f /var/cache/ulfs-packages/xlsatoms ]; then echo "Dependance \"xlsatoms\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xlsatoms/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xlsatoms ]; then echo "Dependance \"xlsatoms\" is not installed. Exiting..." exit fi fi #Checking xlsclients... if [ ! -f /var/cache/ulfs-packages/xlsclients ]; then echo "Dependance \"xlsclients\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xlsclients/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xlsclients ]; then echo "Dependance \"xlsclients\" is not installed. Exiting..." exit fi fi #Checking xmessage... if [ ! -f /var/cache/ulfs-packages/xmessage ]; then echo "Dependance \"xmessage\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xmessage/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xmessage ]; then echo "Dependance \"xmessage\" is not installed. Exiting..." exit fi fi #Checking xmodmap... if [ ! -f /var/cache/ulfs-packages/xmodmap ]; then echo "Dependance \"xmodmap\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xmodmap/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xmodmap ]; then echo "Dependance \"xmodmap\" is not installed. Exiting..." exit fi fi #Checking xpr... if [ ! -f /var/cache/ulfs-packages/xpr ]; then echo "Dependance \"xpr\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xpr/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xpr ]; then echo "Dependance \"xpr\" is not installed. Exiting..." exit fi fi #Checking xprop... if [ ! -f /var/cache/ulfs-packages/xprop ]; then echo "Dependance \"xprop\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xprop/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xprop ]; then echo "Dependance \"xprop\" is not installed. Exiting..." exit fi fi #Checking xrandr... if [ ! -f /var/cache/ulfs-packages/xrandr ]; then echo "Dependance \"xrandr\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xrandr/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xrandr ]; then echo "Dependance \"xrandr\" is not installed. Exiting..." exit fi fi #Checking xrdb... if [ ! -f /var/cache/ulfs-packages/xrdb ]; then echo "Dependance \"xrdb\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xrdb/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xrdb ]; then echo "Dependance \"xrdb\" is not installed. Exiting..." exit fi fi #Checking xrefresh... if [ ! -f /var/cache/ulfs-packages/xrefresh ]; then echo "Dependance \"xrefresh\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xrefresh/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xrefresh ]; then echo "Dependance \"xrefresh\" is not installed. Exiting..." exit fi fi #Checking xset... if [ ! -f /var/cache/ulfs-packages/xset ]; then echo "Dependance \"xset\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xset/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xset ]; then echo "Dependance \"xset\" is not installed. Exiting..." exit fi fi #Checking xsetroot... if [ ! -f /var/cache/ulfs-packages/xsetroot ]; then echo "Dependance \"xsetroot\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xsetroot/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xsetroot ]; then echo "Dependance \"xsetroot\" is not installed. Exiting..." exit fi fi #Checking xvinfo... if [ ! -f /var/cache/ulfs-packages/xvinfo ]; then echo "Dependance \"xvinfo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xvinfo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xvinfo ]; then echo "Dependance \"xvinfo\" is not installed. Exiting..." exit fi fi #Checking xwd... if [ ! -f /var/cache/ulfs-packages/xwd ]; then echo "Dependance \"xwd\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xwd/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xwd ]; then echo "Dependance \"xwd\" is not installed. Exiting..." exit fi fi #Checking xwininfo... if [ ! -f /var/cache/ulfs-packages/xwininfo ]; then echo "Dependance \"xwininfo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xwininfo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xwininfo ]; then echo "Dependance \"xwininfo\" is not installed. Exiting..." exit fi fi #Checking xwud... if [ ! -f /var/cache/ulfs-packages/xwud ]; then echo "Dependance \"xwud\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xwud/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xwud ]; then echo "Dependance \"xwud\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/Xapps/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/Xapps/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/Xapps/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/Xapps/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/Xapps else sudo touch /var/cache/ulfs-packages/Xapps fi #Calculate prepare time a=`cat /var/log/ulfs-packages/Xapps/start.time` b=`cat /var/log/ulfs-packages/Xapps/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/Xapps/download.time` b=`cat /var/log/ulfs-packages/Xapps/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/Xapps/configure.time` b=`cat /var/log/ulfs-packages/Xapps/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/Xapps/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: Xapps" echo "Release: 0.2.2" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script