Skip to content

Instantly share code, notes, and snippets.

@warmwaffles
Created February 4, 2014 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warmwaffles/8798720 to your computer and use it in GitHub Desktop.
Save warmwaffles/8798720 to your computer and use it in GitHub Desktop.
#!/bin/sh
# title : yaourt-install
# description: This script install yaourt downloading and compiling package-query and yaourt
# author : Christopher Fernández
# usage : yaourt-install
echo "================================================"
echo "Remember that you need to be in the sudoers file"
echo "to install Yaourt successfully."
echo "================================================"
echo ""
echo -n "Proceed with installation? [Y/n] "
read yes
function install {
base=$(pacman -Qs base-devel)
if [[ $base == "" ]]; then
echo "You don't have base-devel group package."
echo 'To install base-devel group just do a "pacman -S base-devel"'
exit 1
else
echo "Retrieving package-query ..."
curl -O https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
echo "Uncompressing package-query ..."
tar zxvf package-query.tar.gz
cd package-query
echo "Installing package-query ..."
makepkg -si --noconfirm
cd ..
echo "Retrieving yaourt ..."
curl -O https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
echo "Uncompressing yaourt ..."
tar zxvf yaourt.tar.gz
cd yaourt
echo "Installing yaourt ..."
makepkg -si --noconfirm
echo "Done!"
fi
}
if [[ $yes == "Y" || $yes == "y" || $yes == "" ]]; then
install
else
echo "Exiting ..."
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment