#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.1 # Package: GAMES-GNOME #=========================== # DB commit: d35a620850806ab581b32cb34d268a904c9c0a5f # APP commit: #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: GAMES-GNOME" echo "Release: 0.1" 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/GAMES-GNOME/ #Saving start timestamp date +%s > /var/log/ulfs-packages/GAMES-GNOME/start.time #Going to source directory... cd /sources #Checking dependances... #Checking gnome-games... if [ ! -f /var/cache/ulfs-packages/gnome-games ]; then echo "Dependance \"gnome-games\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/gnome-games/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gnome-games ]; then echo "Dependance \"gnome-games\" is not installed. Exiting..." exit fi fi #Checking gnome-mahjongg... if [ ! -f /var/cache/ulfs-packages/gnome-mahjongg ]; then echo "Dependance \"gnome-mahjongg\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/gnome-mahjongg/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gnome-mahjongg ]; then echo "Dependance \"gnome-mahjongg\" is not installed. Exiting..." exit fi fi #Checking gnome-sudoku... if [ ! -f /var/cache/ulfs-packages/gnome-sudoku ]; then echo "Dependance \"gnome-sudoku\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/gnome-sudoku/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gnome-sudoku ]; then echo "Dependance \"gnome-sudoku\" is not installed. Exiting..." exit fi fi #Checking gnome-mines... if [ ! -f /var/cache/ulfs-packages/gnome-mines ]; then echo "Dependance \"gnome-mines\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/gnome-mines/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gnome-mines ]; then echo "Dependance \"gnome-mines\" is not installed. Exiting..." exit fi fi #Checking five-or-more... if [ ! -f /var/cache/ulfs-packages/five-or-more ]; then echo "Dependance \"five-or-more\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/five-or-more/install -O - | bash if [ ! -f /var/cache/ulfs-packages/five-or-more ]; then echo "Dependance \"five-or-more\" is not installed. Exiting..." exit fi fi #Checking quadrapassel... if [ ! -f /var/cache/ulfs-packages/quadrapassel ]; then echo "Dependance \"quadrapassel\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/quadrapassel/install -O - | bash if [ ! -f /var/cache/ulfs-packages/quadrapassel ]; then echo "Dependance \"quadrapassel\" is not installed. Exiting..." exit fi fi #Checking swell-foop... if [ ! -f /var/cache/ulfs-packages/swell-foop ]; then echo "Dependance \"swell-foop\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/swell-foop/install -O - | bash if [ ! -f /var/cache/ulfs-packages/swell-foop ]; then echo "Dependance \"swell-foop\" is not installed. Exiting..." exit fi fi #Checking gnome-nibbles... if [ ! -f /var/cache/ulfs-packages/gnome-nibbles ]; then echo "Dependance \"gnome-nibbles\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/gnome-nibbles/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gnome-nibbles ]; then echo "Dependance \"gnome-nibbles\" is not installed. Exiting..." exit fi fi #Checking gnome-chess... if [ ! -f /var/cache/ulfs-packages/gnome-chess ]; then echo "Dependance \"gnome-chess\" not found. Trying to install..."; wget --no-check-certificate https://ulfs.org/linux/packages//0.1/gnome-chess/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gnome-chess ]; then echo "Dependance \"gnome-chess\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/GAMES-GNOME/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/GAMES-GNOME/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/GAMES-GNOME/install.time #Running install script... make install #Saving finish timestamp date +%s > /var/log/ulfs-packages/GAMES-GNOME/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/GAMES-GNOME else sudo touch /var/cache/ulfs-packages/GAMES-GNOME fi #Calculate prepare time a=`cat /var/log/ulfs-packages/GAMES-GNOME/start.time` b=`cat /var/log/ulfs-packages/GAMES-GNOME/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/GAMES-GNOME/download.time` b=`cat /var/log/ulfs-packages/GAMES-GNOME/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/GAMES-GNOME/configure.time` b=`cat /var/log/ulfs-packages/GAMES-GNOME/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/GAMES-GNOME/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: GAMES-GNOME" echo "Release: 0.1" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script