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