#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.3 # Package: KDE6-apps-pim #=========================== # DB commit: f64c98382982c764c3ba140bfcbbc73d93096acd # APP commit: e09dc78145b10de9481608254eb2ac99efd0068b #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: KDE6-apps-pim" 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-pim/ #Saving start timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-pim/start.time #Going to source directory... cd /sources #Checking dependances... #Checking akonadi-calendar-tools... if [ ! -f /var/cache/ulfs-packages/akonadi-calendar-tools ]; then echo "Dependance \"akonadi-calendar-tools\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/akonadi-calendar-tools/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/akonadi-calendar-tools/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/akonadi-calendar-tools ]; then echo "Dependance \"akonadi-calendar-tools\" is not installed. Exiting..." exit fi fi #Checking akonadiconsole... if [ ! -f /var/cache/ulfs-packages/akonadiconsole ]; then echo "Dependance \"akonadiconsole\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/akonadiconsole/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/akonadiconsole/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/akonadiconsole ]; then echo "Dependance \"akonadiconsole\" is not installed. Exiting..." exit fi fi #Checking akregator... if [ ! -f /var/cache/ulfs-packages/akregator ]; then echo "Dependance \"akregator\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/akregator/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/akregator/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/akregator ]; then echo "Dependance \"akregator\" is not installed. Exiting..." exit fi fi #Checking grantlee-editor... if [ ! -f /var/cache/ulfs-packages/grantlee-editor ]; then echo "Dependance \"grantlee-editor\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/grantlee-editor/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/grantlee-editor/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/grantlee-editor ]; then echo "Dependance \"grantlee-editor\" is not installed. Exiting..." exit fi fi #Checking itinerary... if [ ! -f /var/cache/ulfs-packages/itinerary ]; then echo "Dependance \"itinerary\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/itinerary/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/itinerary/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/itinerary ]; then echo "Dependance \"itinerary\" is not installed. Exiting..." exit fi fi #Checking kaddressbook... if [ ! -f /var/cache/ulfs-packages/kaddressbook ]; then echo "Dependance \"kaddressbook\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kaddressbook/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kaddressbook/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kaddressbook ]; then echo "Dependance \"kaddressbook\" is not installed. Exiting..." exit fi fi #Checking kalarm... if [ ! -f /var/cache/ulfs-packages/kalarm ]; then echo "Dependance \"kalarm\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kalarm/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kalarm/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kalarm ]; then echo "Dependance \"kalarm\" is not installed. Exiting..." exit fi fi #Checking kdepim-addons... if [ ! -f /var/cache/ulfs-packages/kdepim-addons ]; then echo "Dependance \"kdepim-addons\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kdepim-addons/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kdepim-addons/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kdepim-addons ]; then echo "Dependance \"kdepim-addons\" is not installed. Exiting..." exit fi fi #Checking kleopatra... if [ ! -f /var/cache/ulfs-packages/kleopatra ]; then echo "Dependance \"kleopatra\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kleopatra/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kleopatra/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kleopatra ]; then echo "Dependance \"kleopatra\" is not installed. Exiting..." exit fi fi #Checking kmail... if [ ! -f /var/cache/ulfs-packages/kmail ]; then echo "Dependance \"kmail\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kmail/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kmail/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kmail ]; then echo "Dependance \"kmail\" is not installed. Exiting..." exit fi fi #Checking kontact... if [ ! -f /var/cache/ulfs-packages/kontact ]; then echo "Dependance \"kontact\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kontact/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kontact/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kontact ]; then echo "Dependance \"kontact\" is not installed. Exiting..." exit fi fi #Checking korganizer... if [ ! -f /var/cache/ulfs-packages/korganizer ]; then echo "Dependance \"korganizer\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/korganizer/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/korganizer/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/korganizer ]; then echo "Dependance \"korganizer\" is not installed. Exiting..." exit fi fi #Checking merkuro... if [ ! -f /var/cache/ulfs-packages/merkuro ]; then echo "Dependance \"merkuro\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/merkuro/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/merkuro/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/merkuro ]; then echo "Dependance \"merkuro\" is not installed. Exiting..." exit fi fi #Checking zanshin... if [ ! -f /var/cache/ulfs-packages/zanshin ]; then echo "Dependance \"zanshin\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/zanshin/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/zanshin/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/zanshin ]; then echo "Dependance \"zanshin\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-pim/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-pim/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-pim/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-pim/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-pim else sudo touch /var/cache/ulfs-packages/KDE6-apps-pim fi #Calculate prepare time a=`cat /var/log/ulfs-packages/KDE6-apps-pim/start.time` b=`cat /var/log/ulfs-packages/KDE6-apps-pim/configure.time` dp=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/KDE6-apps-pim/configure.time` b=`cat /var/log/ulfs-packages/KDE6-apps-pim/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/KDE6-apps-pim/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: KDE6-apps-pim" echo "Release: 0.2.3" echo "Prepare time: $dp sec." echo "Build time: $db sec." #End of script