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