#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.3 # Package: KDE-apps #=========================== # DB commit: f64c98382982c764c3ba140bfcbbc73d93096acd # APP commit: e09dc78145b10de9481608254eb2ac99efd0068b #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: KDE-apps" 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/KDE-apps/ #Saving start timestamp date +%s > /var/log/ulfs-packages/KDE-apps/start.time #Going to source directory... cd /sources #Checking dependances... #Checking ark... if [ ! -f /var/cache/ulfs-packages/ark ]; then echo "Dependance \"ark\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/ark/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/ark/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/ark ]; then echo "Dependance \"ark\" is not installed. Exiting..." exit fi fi #Checking dolphin... if [ ! -f /var/cache/ulfs-packages/dolphin ]; then echo "Dependance \"dolphin\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/dolphin/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/dolphin/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/dolphin ]; then echo "Dependance \"dolphin\" is not installed. Exiting..." exit fi fi #Checking dolphin-plugins... if [ ! -f /var/cache/ulfs-packages/dolphin-plugins ]; then echo "Dependance \"dolphin-plugins\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/dolphin-plugins/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/dolphin-plugins/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/dolphin-plugins ]; then echo "Dependance \"dolphin-plugins\" is not installed. Exiting..." exit fi fi #Checking kdenlive... if [ ! -f /var/cache/ulfs-packages/kdenlive ]; then echo "Dependance \"kdenlive\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kdenlive/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kdenlive/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kdenlive ]; then echo "Dependance \"kdenlive\" is not installed. Exiting..." exit fi fi #Checking kmix... if [ ! -f /var/cache/ulfs-packages/kmix ]; then echo "Dependance \"kmix\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kmix/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kmix/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kmix ]; then echo "Dependance \"kmix\" is not installed. Exiting..." exit fi fi #Checking khelpcenter... if [ ! -f /var/cache/ulfs-packages/khelpcenter ]; then echo "Dependance \"khelpcenter\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/khelpcenter/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/khelpcenter/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/khelpcenter ]; then echo "Dependance \"khelpcenter\" is not installed. Exiting..." exit fi fi #Checking konsole... if [ ! -f /var/cache/ulfs-packages/konsole ]; then echo "Dependance \"konsole\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/konsole/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/konsole/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/konsole ]; then echo "Dependance \"konsole\" is not installed. Exiting..." exit fi fi #Checking konversation... if [ ! -f /var/cache/ulfs-packages/konversation ]; then echo "Dependance \"konversation\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/konversation/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/konversation/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/konversation ]; then echo "Dependance \"konversation\" is not installed. Exiting..." exit fi fi #Checking libkexiv2... if [ ! -f /var/cache/ulfs-packages/libkexiv2 ]; then echo "Dependance \"libkexiv2\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/libkexiv2/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/libkexiv2/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/libkexiv2 ]; then echo "Dependance \"libkexiv2\" is not installed. Exiting..." exit fi fi #Checking kio-extras... if [ ! -f /var/cache/ulfs-packages/kio-extras ]; then echo "Dependance \"kio-extras\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kio-extras/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kio-extras/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kio-extras ]; then echo "Dependance \"kio-extras\" is not installed. Exiting..." exit fi fi #Checking okular... if [ ! -f /var/cache/ulfs-packages/okular ]; then echo "Dependance \"okular\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/okular/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/okular/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/okular ]; then echo "Dependance \"okular\" is not installed. Exiting..." exit fi fi #Checking libkdcraw... if [ ! -f /var/cache/ulfs-packages/libkdcraw ]; then echo "Dependance \"libkdcraw\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/libkdcraw/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/libkdcraw/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/libkdcraw ]; then echo "Dependance \"libkdcraw\" is not installed. Exiting..." exit fi fi #Checking gwenview... if [ ! -f /var/cache/ulfs-packages/gwenview ]; then echo "Dependance \"gwenview\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/gwenview/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/gwenview/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/gwenview ]; then echo "Dependance \"gwenview\" is not installed. Exiting..." exit fi fi #Checking libkcddb... if [ ! -f /var/cache/ulfs-packages/libkcddb ]; then echo "Dependance \"libkcddb\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/libkcddb/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/libkcddb/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/libkcddb ]; then echo "Dependance \"libkcddb\" is not installed. Exiting..." exit fi fi #Checking k3b... if [ ! -f /var/cache/ulfs-packages/k3b ]; then echo "Dependance \"k3b\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/k3b/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/k3b/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/k3b ]; then echo "Dependance \"k3b\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/KDE-apps/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/KDE-apps/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/KDE-apps/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/KDE-apps/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/KDE-apps else sudo touch /var/cache/ulfs-packages/KDE-apps fi #Calculate prepare time a=`cat /var/log/ulfs-packages/KDE-apps/start.time` b=`cat /var/log/ulfs-packages/KDE-apps/configure.time` dp=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/KDE-apps/configure.time` b=`cat /var/log/ulfs-packages/KDE-apps/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/KDE-apps/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: KDE-apps" echo "Release: 0.2.3" echo "Prepare time: $dp sec." echo "Build time: $db sec." #End of script