Created
November 5, 2013 16:28
-
-
Save juranki/7321711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/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