#!/bin/bash
ORDER="imlib2-cvs eet-cvs edb-cvs imlib2_loaders-cvs epeg-cvs evas-cvs embryo-cvs ecore-cvs edje-cvs emotion-cvs epsilon-cvs ewl-cvs ephoto-cvs esmart-cvs e-cvs engrave-cvs e_utils-cvs examine-cvs etk-cvs evfs-cvs entropy-cvs entice-cvs elicit-cvs eclair-cvs entrance-cvs exml-cvs e_modules-cvs"
src_dir="/usr/src"
e17_dir="$src_dir/e17"
####################################
# Verify permission to take action #
####################################
if [ -w $src_dir ]
then
echo "Beginning to make e17, this may take some time"
else
echo "You have insufficent privilges to run this command, please become root to run this"
exit 1
fi
################################
# Enter into the e17 directory #
################################
mkdir -p $e17_dir
if [ ! -d $e17_dir ]
then
rm $e17_dir &>/dev/null
mkdir -p $e17_dir
fi
cd $e17_dir
for pkg_name in $ORDER; do
pkg_dir="$e17_dir/$pkg_name"
clear
echo Package Order:
echo $ORDER
echo
echo Building Package For $pkg_name
####################################################
# Enter into the directory for the current package #
####################################################
mkdir -p $pkg_dir
if [ ! -d $pkg_dir ]; then
rm $pkg_dir &>/dev/null
mkdir -p $pkg_dir
fi
cd $pkg_dir
########################################
# Verify the existance of the PKGBUILD #
# if it fails download it from the AUR #
########################################
if [ -e $pkg_dir/PKGBUILD ]; then
echo "==> $pkg_name/PKGBUILD present"
else
echo "==> Downloading $pkg_name/PKGBUILD"
wget -c http://aur.archlinux.org/packages/$pkg_name/$pkg_name/PKGBUILD
fi
######################################
# evas needs special files, get them #
######################################
if [ $pkg_name = "evas-cvs" ]; then
if [ -e $pkg_dir/e17.profile ]; then
echo "==> $pkg_name/e17.profile present"
else
echo "==> Downloading $pkg_name/e17.profile"
wget -c http://aur.archlinux.org/packages/$pkg_name/$pkg_name/e17.profile
fi
if [ -e $pkg_dir/evas-cvs.install ]; then
echo "==> $pkg_name/evas-cvs.install present"
else
echo "==> Downloading $pkg_name/evas-cvs.install"
wget -c http://aur.archlinux.org/packages/$pkg_name/$pkg_name/evas-cvs.install
fi
fi
###################################
# e needs special files, get them #
###################################
if [ $pkg_name = "e-cvs" ]; then
if [ -e $pkg_dir/e17.desktop ]; then
echo "==> $pkg_name/e17.desktop present"
else
echo "==> Downloading $pkg_name/e17.desktop"
wget -c http://aur.archlinux.org/packages/$pkg_name/$pkg_name/e17.desktop
fi
fi
##########################################
# entrance needs special files, get them #
##########################################
if [ $pkg_name = "entrance-cvs" ]; then
if [ -e $pkg_dir/entranced ]; then
echo "==> $pkg_name/entranced present"
else
echo "==> Downloading $pkg_name/entranced"
wget -c http://aur.archlinux.org/packages/$pkg_name/$pkg_name/entranced
fi
fi
######################
# Remove stale files #
######################
rm -r *.pkg* pkg/ filelist &>/dev/null
#################
# Build Package #
#################
versionpkg -f &>/dev/null
##############################################
# On failure to build, prompt user to resume #
##############################################
if [ $? -eq 1 ]; then
i=1;
while [ $i -eq 1 ] ; do
echo "Build of $pkg_name Fails, Continue? (N/y)"
read opt
case "$opt" in
y)
echo "Continuing pkgbuild"
i=0
;;
*)
echo "Exiting..."
exit 1
esac
done
else
echo "Build of $pkg_name complete"
fi
########################
# Install the packages #
########################
if [ -e $pkg_dir/.install_success ]; then
/usr/bin/pacman -U $pkg_dir/$pkg_name*.pkg.tar.gz #upgrade
else
/usr/bin/pacman -A $pkg_dir/$pkg_name*.pkg.tar.gz #first time install
if [ $? -eq 0 ]; then
echo "" > $pkg_dir/.install_success
fi
fi
##############################
# Return to the e17 root dir #
##############################
cd $e17_dir
done