#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.3 # Package: KDE6-apps-graphics #=========================== # DB commit: f64c98382982c764c3ba140bfcbbc73d93096acd # APP commit: e09dc78145b10de9481608254eb2ac99efd0068b #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: KDE6-apps-graphics" echo "Release: 0.2.3" 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/KDE6-apps-graphics/ #Saving start timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-graphics/start.time #Going to source directory... cd /sources #Checking dependances... #Checking arianna... if [ ! -f /var/cache/ulfs-packages/arianna ]; then echo "Dependance \"arianna\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/arianna/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/arianna/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/arianna ]; then echo "Dependance \"arianna\" is not installed. Exiting..." exit fi fi #Checking colord-kde... if [ ! -f /var/cache/ulfs-packages/colord-kde ]; then echo "Dependance \"colord-kde\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/colord-kde/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/colord-kde/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/colord-kde ]; then echo "Dependance \"colord-kde\" is not installed. Exiting..." exit fi fi #Checking kamera... if [ ! -f /var/cache/ulfs-packages/kamera ]; then echo "Dependance \"kamera\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kamera/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kamera/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kamera ]; then echo "Dependance \"kamera\" is not installed. Exiting..." exit fi fi #Checking kcolorchooser... if [ ! -f /var/cache/ulfs-packages/kcolorchooser ]; then echo "Dependance \"kcolorchooser\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kcolorchooser/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kcolorchooser/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kcolorchooser ]; then echo "Dependance \"kcolorchooser\" is not installed. Exiting..." exit fi fi #Checking kgraphviewer... if [ ! -f /var/cache/ulfs-packages/kgraphviewer ]; then echo "Dependance \"kgraphviewer\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kgraphviewer/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kgraphviewer/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kgraphviewer ]; then echo "Dependance \"kgraphviewer\" is not installed. Exiting..." exit fi fi #Checking kimagemapeditor... if [ ! -f /var/cache/ulfs-packages/kimagemapeditor ]; then echo "Dependance \"kimagemapeditor\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kimagemapeditor/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kimagemapeditor/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kimagemapeditor ]; then echo "Dependance \"kimagemapeditor\" is not installed. Exiting..." exit fi fi #Checking koko... if [ ! -f /var/cache/ulfs-packages/koko ]; then echo "Dependance \"koko\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/koko/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/koko/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/koko ]; then echo "Dependance \"koko\" is not installed. Exiting..." exit fi fi #Checking kolourpaint... if [ ! -f /var/cache/ulfs-packages/kolourpaint ]; then echo "Dependance \"kolourpaint\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kolourpaint/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kolourpaint/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kolourpaint ]; then echo "Dependance \"kolourpaint\" is not installed. Exiting..." exit fi fi #Checking kruler... if [ ! -f /var/cache/ulfs-packages/kruler ]; then echo "Dependance \"kruler\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kruler/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kruler/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kruler ]; then echo "Dependance \"kruler\" is not installed. Exiting..." exit fi fi #Checking skanlite... if [ ! -f /var/cache/ulfs-packages/skanlite ]; then echo "Dependance \"skanlite\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/skanlite/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/skanlite/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/skanlite ]; then echo "Dependance \"skanlite\" is not installed. Exiting..." exit fi fi #Checking svgpart... if [ ! -f /var/cache/ulfs-packages/svgpart ]; then echo "Dependance \"svgpart\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/svgpart/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/svgpart/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/svgpart ]; then echo "Dependance \"svgpart\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-graphics/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-graphics/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-graphics/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-graphics/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/KDE6-apps-graphics else sudo touch /var/cache/ulfs-packages/KDE6-apps-graphics fi #Calculate prepare time a=`cat /var/log/ulfs-packages/KDE6-apps-graphics/start.time` b=`cat /var/log/ulfs-packages/KDE6-apps-graphics/configure.time` dp=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/KDE6-apps-graphics/configure.time` b=`cat /var/log/ulfs-packages/KDE6-apps-graphics/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/KDE6-apps-graphics/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: KDE6-apps-graphics" echo "Release: 0.2.3" echo "Prepare time: $dp sec." echo "Build time: $db sec." #End of script