Skip to content

Instantly share code, notes, and snippets.

@juranki
Created November 5, 2013 16:28
Show Gist options
  • Save juranki/7321711 to your computer and use it in GitHub Desktop.
Save juranki/7321711 to your computer and use it in GitHub Desktop.
!/usr/bin/env bash
# this script assumes a fresh Arch Linux 2013.05 x64
# filesystem conflicts with some other system, so ignore it first
pacman -Syu -q --noconfirm --ignore filesystem
pacman -S -q --noconfirm --needed \
filesystem \
base-devel \
git \
wget
function check_install {
echo `which $1`
if [ ! `which $1` ]; then
echo "installing ${1} failed. quitting."
exit
fi
}
[ -d ~/packs ] || mkdir ~/packs
function inst_pack {
if [ ! `which $1` ]; then
dir=`echo $1 | cut -c-2`
cd ~/packs
wget https://aur.archlinux.org/packages/$dir/$1/$1.tar.gz
tar xzf $1.tar.gz
cd $1
makepkg -si --asroot --noconfirm
fi
check_install $1
}
inst_pack package-query
inst_pack yaourt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment