#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.3 # Package: XFCE #=========================== # DB commit: f64c98382982c764c3ba140bfcbbc73d93096acd # APP commit: e09dc78145b10de9481608254eb2ac99efd0068b #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: XFCE" 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/XFCE/ #Saving start timestamp date +%s > /var/log/ulfs-packages/XFCE/start.time #Going to source directory... cd /sources #Checking dependances... #Checking libxfce4util... if [ ! -f /var/cache/ulfs-packages/libxfce4util ]; then echo "Dependance \"libxfce4util\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/libxfce4util/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/libxfce4util/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/libxfce4util ]; then echo "Dependance \"libxfce4util\" is not installed. Exiting..." exit fi fi #Checking xfconf... if [ ! -f /var/cache/ulfs-packages/xfconf ]; then echo "Dependance \"xfconf\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfconf/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfconf/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfconf ]; then echo "Dependance \"xfconf\" is not installed. Exiting..." exit fi fi #Checking libxfce4ui... if [ ! -f /var/cache/ulfs-packages/libxfce4ui ]; then echo "Dependance \"libxfce4ui\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/libxfce4ui/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/libxfce4ui/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/libxfce4ui ]; then echo "Dependance \"libxfce4ui\" is not installed. Exiting..." exit fi fi #Checking exo... if [ ! -f /var/cache/ulfs-packages/exo ]; then echo "Dependance \"exo\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/exo/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/exo/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/exo ]; then echo "Dependance \"exo\" is not installed. Exiting..." exit fi fi #Checking garcon... if [ ! -f /var/cache/ulfs-packages/garcon ]; then echo "Dependance \"garcon\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/garcon/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/garcon/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/garcon ]; then echo "Dependance \"garcon\" is not installed. Exiting..." exit fi fi #Checking xfce4-panel... if [ ! -f /var/cache/ulfs-packages/xfce4-panel ]; then echo "Dependance \"xfce4-panel\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-panel/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-panel/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-panel ]; then echo "Dependance \"xfce4-panel\" is not installed. Exiting..." exit fi fi #Checking thunar... if [ ! -f /var/cache/ulfs-packages/thunar ]; then echo "Dependance \"thunar\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/thunar/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/thunar/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/thunar ]; then echo "Dependance \"thunar\" is not installed. Exiting..." exit fi fi #Checking thunar-volman... if [ ! -f /var/cache/ulfs-packages/thunar-volman ]; then echo "Dependance \"thunar-volman\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/thunar-volman/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/thunar-volman/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/thunar-volman ]; then echo "Dependance \"thunar-volman\" is not installed. Exiting..." exit fi fi #Checking tumbler... if [ ! -f /var/cache/ulfs-packages/tumbler ]; then echo "Dependance \"tumbler\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/tumbler/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/tumbler/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/tumbler ]; then echo "Dependance \"tumbler\" is not installed. Exiting..." exit fi fi #Checking xfce4-appfinder... if [ ! -f /var/cache/ulfs-packages/xfce4-appfinder ]; then echo "Dependance \"xfce4-appfinder\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-appfinder/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-appfinder/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-appfinder ]; then echo "Dependance \"xfce4-appfinder\" is not installed. Exiting..." exit fi fi #Checking xfce4-power-manager... if [ ! -f /var/cache/ulfs-packages/xfce4-power-manager ]; then echo "Dependance \"xfce4-power-manager\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-power-manager/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-power-manager/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-power-manager ]; then echo "Dependance \"xfce4-power-manager\" is not installed. Exiting..." exit fi fi #Checking xfce4-settings... if [ ! -f /var/cache/ulfs-packages/xfce4-settings ]; then echo "Dependance \"xfce4-settings\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-settings/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-settings/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-settings ]; then echo "Dependance \"xfce4-settings\" is not installed. Exiting..." exit fi fi #Checking xfdesktop... if [ ! -f /var/cache/ulfs-packages/xfdesktop ]; then echo "Dependance \"xfdesktop\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfdesktop/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfdesktop/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfdesktop ]; then echo "Dependance \"xfdesktop\" is not installed. Exiting..." exit fi fi #Checking xfwm4... if [ ! -f /var/cache/ulfs-packages/xfwm4 ]; then echo "Dependance \"xfwm4\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfwm4/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfwm4/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfwm4 ]; then echo "Dependance \"xfwm4\" is not installed. Exiting..." exit fi fi #Checking xfce4-session... if [ ! -f /var/cache/ulfs-packages/xfce4-session ]; then echo "Dependance \"xfce4-session\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-session/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-session/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-session ]; then echo "Dependance \"xfce4-session\" is not installed. Exiting..." exit fi fi #Checking xfce4-terminal... if [ ! -f /var/cache/ulfs-packages/xfce4-terminal ]; then echo "Dependance \"xfce4-terminal\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-terminal/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-terminal/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-terminal ]; then echo "Dependance \"xfce4-terminal\" is not installed. Exiting..." exit fi fi #Checking xfburn... if [ ! -f /var/cache/ulfs-packages/xfburn ]; then echo "Dependance \"xfburn\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfburn/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfburn/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfburn ]; then echo "Dependance \"xfburn\" is not installed. Exiting..." exit fi fi #Checking ristretto... if [ ! -f /var/cache/ulfs-packages/ristretto ]; then echo "Dependance \"ristretto\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/ristretto/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/ristretto/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/ristretto ]; then echo "Dependance \"ristretto\" is not installed. Exiting..." exit fi fi #Checking xfce4-dev-tools... if [ ! -f /var/cache/ulfs-packages/xfce4-dev-tools ]; then echo "Dependance \"xfce4-dev-tools\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-dev-tools/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-dev-tools/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-dev-tools ]; then echo "Dependance \"xfce4-dev-tools\" is not installed. Exiting..." exit fi fi #Checking xfce4-notifyd... if [ ! -f /var/cache/ulfs-packages/xfce4-notifyd ]; then echo "Dependance \"xfce4-notifyd\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-notifyd/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-notifyd/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-notifyd ]; then echo "Dependance \"xfce4-notifyd\" is not installed. Exiting..." exit fi fi #Checking xfce4-pulseaudio-plugin... if [ ! -f /var/cache/ulfs-packages/xfce4-pulseaudio-plugin ]; then echo "Dependance \"xfce4-pulseaudio-plugin\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-pulseaudio-plugin/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-pulseaudio-plugin/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-pulseaudio-plugin ]; then echo "Dependance \"xfce4-pulseaudio-plugin\" is not installed. Exiting..." exit fi fi #Checking xfce4-screenshooter... if [ ! -f /var/cache/ulfs-packages/xfce4-screenshooter ]; then echo "Dependance \"xfce4-screenshooter\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-screenshooter/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-screenshooter/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-screenshooter ]; then echo "Dependance \"xfce4-screenshooter\" is not installed. Exiting..." exit fi fi #Checking mousepad... if [ ! -f /var/cache/ulfs-packages/mousepad ]; then echo "Dependance \"mousepad\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/mousepad/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/mousepad/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/mousepad ]; then echo "Dependance \"mousepad\" is not installed. Exiting..." exit fi fi #Checking xfce4-taskmanager... if [ ! -f /var/cache/ulfs-packages/xfce4-taskmanager ]; then echo "Dependance \"xfce4-taskmanager\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-taskmanager/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-taskmanager/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-taskmanager ]; then echo "Dependance \"xfce4-taskmanager\" is not installed. Exiting..." exit fi fi #Checking xfce4-screensaver... if [ ! -f /var/cache/ulfs-packages/xfce4-screensaver ]; then echo "Dependance \"xfce4-screensaver\" not found. Trying to install..."; if [[ "$ULFS_DOWNLOAD_APP" == "curl" ]]; then curl https://umvirt.com/linux/packages//0.2.3/xfce4-screensaver/install -k | bash else wget --no-check-certificate https://umvirt.com/linux/packages//0.2.3/xfce4-screensaver/install -O - | bash fi if [ ! -f /var/cache/ulfs-packages/xfce4-screensaver ]; then echo "Dependance \"xfce4-screensaver\" is not installed. Exiting..." exit fi fi #Saving configuration timestamp date +%s > /var/log/ulfs-packages/XFCE/configure.time #Saving build timestamp date +%s > /var/log/ulfs-packages/XFCE/build.time #Saving install timestamp date +%s > /var/log/ulfs-packages/XFCE/install.time #Running install script... # #Saving finish timestamp date +%s > /var/log/ulfs-packages/XFCE/finish.time #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/XFCE else sudo touch /var/cache/ulfs-packages/XFCE fi #Calculate prepare time a=`cat /var/log/ulfs-packages/XFCE/start.time` b=`cat /var/log/ulfs-packages/XFCE/configure.time` dp=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/XFCE/configure.time` b=`cat /var/log/ulfs-packages/XFCE/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/XFCE/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: XFCE" echo "Release: 0.2.3" echo "Prepare time: $dp sec." echo "Build time: $db sec." #End of script