#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.3 # Package: KDE6-apps-education #=========================== # DB commit: e480449868ca4262eee264eafd6c2d45b7f54583 # APP commit: b0e7f121177a769c20a4c985867d650259b096ce #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: KDE6-apps-education" 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-education/ #Saving start timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-education/start.time #Going to source directory... cd /sources #Checking dependances... #Checking blinken... if [ ! -f /var/cache/ulfs-packages/blinken ]; then echo "Dependance \"blinken\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/blinken/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/blinken/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/blinken ]; then echo "Dependance \"blinken\" is not installed. Exiting..." exit fi fi #Checking cantor... if [ ! -f /var/cache/ulfs-packages/cantor ]; then echo "Dependance \"cantor\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/cantor/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/cantor/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/cantor ]; then echo "Dependance \"cantor\" is not installed. Exiting..." exit fi fi #Checking kalgebra... if [ ! -f /var/cache/ulfs-packages/kalgebra ]; then echo "Dependance \"kalgebra\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kalgebra/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kalgebra/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kalgebra ]; then echo "Dependance \"kalgebra\" is not installed. Exiting..." exit fi fi #Checking kanagram... if [ ! -f /var/cache/ulfs-packages/kanagram ]; then echo "Dependance \"kanagram\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kanagram/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kanagram/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kanagram ]; then echo "Dependance \"kanagram\" is not installed. Exiting..." exit fi fi #Checking kbruch... if [ ! -f /var/cache/ulfs-packages/kbruch ]; then echo "Dependance \"kbruch\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kbruch/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kbruch/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kbruch ]; then echo "Dependance \"kbruch\" is not installed. Exiting..." exit fi fi #Checking kgeography... if [ ! -f /var/cache/ulfs-packages/kgeography ]; then echo "Dependance \"kgeography\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kgeography/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kgeography/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kgeography ]; then echo "Dependance \"kgeography\" is not installed. Exiting..." exit fi fi #Checking khangman... if [ ! -f /var/cache/ulfs-packages/khangman ]; then echo "Dependance \"khangman\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/khangman/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/khangman/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/khangman ]; then echo "Dependance \"khangman\" is not installed. Exiting..." exit fi fi #Checking kiten... if [ ! -f /var/cache/ulfs-packages/kiten ]; then echo "Dependance \"kiten\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kiten/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kiten/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kiten ]; then echo "Dependance \"kiten\" is not installed. Exiting..." exit fi fi #Checking klettres... if [ ! -f /var/cache/ulfs-packages/klettres ]; then echo "Dependance \"klettres\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/klettres/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/klettres/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/klettres ]; then echo "Dependance \"klettres\" is not installed. Exiting..." exit fi fi #Checking kmplot... if [ ! -f /var/cache/ulfs-packages/kmplot ]; then echo "Dependance \"kmplot\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kmplot/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kmplot/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kmplot ]; then echo "Dependance \"kmplot\" is not installed. Exiting..." exit fi fi #Checking kturtle... if [ ! -f /var/cache/ulfs-packages/kturtle ]; then echo "Dependance \"kturtle\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kturtle/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kturtle/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kturtle ]; then echo "Dependance \"kturtle\" is not installed. Exiting..." exit fi fi #Checking kwordquiz... if [ ! -f /var/cache/ulfs-packages/kwordquiz ]; then echo "Dependance \"kwordquiz\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/kwordquiz/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/kwordquiz/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/kwordquiz ]; then echo "Dependance \"kwordquiz\" is not installed. Exiting..." exit fi fi #Checking marble... if [ ! -f /var/cache/ulfs-packages/marble ]; then echo "Dependance \"marble\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/marble/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/marble/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/marble ]; then echo "Dependance \"marble\" is not installed. Exiting..." exit fi fi #Checking parley... if [ ! -f /var/cache/ulfs-packages/parley ]; then echo "Dependance \"parley\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/parley/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/parley/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/parley ]; then echo "Dependance \"parley\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-education/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-education/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-education/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/KDE6-apps-education/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-education else sudo touch /var/cache/ulfs-packages/KDE6-apps-education fi #Calculate prepare time a=`cat /var/log/ulfs-packages/KDE6-apps-education/start.time` b=`cat /var/log/ulfs-packages/KDE6-apps-education/configure.time` dp=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/KDE6-apps-education/configure.time` b=`cat /var/log/ulfs-packages/KDE6-apps-education/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/KDE6-apps-education/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: KDE6-apps-education" echo "Release: 0.2.3" echo "Prepare time: $dp sec." echo "Build time: $db sec." #End of script