Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 89 lines (67 sloc) 2.16 KB
if [ "$(id -u)" -eq 0 ]; then
echo >&2 "Error: $0 is intended to be run as a user with sudo access"
exit 1
scriptdir="$(cd "$(dirname "$0")" && pwd)"
makepkg () {
command makepkg --noconfirm --needed "$@"
pacman () {
command sudo pacman --noconfirm --needed "$@"
install_aur () {
if [ $# -gt 0 ]; then
pacman -Sya "$@"
git clone "$pkg.git"
cd "$pkg"
makepkg -sci
cd - >/dev/null
pacman -Sy
pacman -S openssh && sudo systemctl enable sshd && sudo systemctl start sshd
sudo sed -i -e '/^OPTIONS=/{ s/!*libtool/libtool/; s/libtool/!libtool/; }' /etc/makepkg.conf
CPUS=$(grep -c processor /proc/cpuinfo)
JOBS=$(expr $CPUS \* 3 / 2)
sudo sed -i -e "s,#*MAKEFLAGS=.*,MAKEFLAGS=\"-j$JOBS\"," /etc/makepkg.conf
if [ "$(uname -m)" = "x86_64" ]; then
sudo sed -i -e "/^#\[multilib\]/{ s/^#//; n; s/^#// }" /etc/pacman.conf
# Ensure we can build 32 bit binaries
pacman -S gcc-libs-multilib gcc-multilib
pacman -S nss-mdns avahi pkgfile
sudo pkgfile -u
sudo sed -i -e '/hosts:/{ s/mdns_minimal //g; s/dns/mdns_minimal dns/; }' /etc/nsswitch.conf
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service || true
pacman -S vim tmux subversion python2 python2-pip
# Clean up
sudo pacman --noconfirm -R ppp nano pcmciautils
# GUI bits
sudo rm -f /usr/bin/X11 || :
sudo ln -sf . /usr/bin/X11
pacman -S xorg-xrdb xorg-xauth xorg-server xorg-xinit slim xorg-xset autocutsel
pacman -S rxvt-unicode
sudo systemctl enable slim.service
cat >X20-local-fonts.conf <<END
Section "Files"
FontPath "/usr/share/fonts/local/"
sudo mv X20-local-fonts.conf /etc/X11/xorg.conf.d/
mkdir -p ~/Build
cd ~/Build
install_aur urxvtcd
if grep -q vmci /proc/misc; then
# vmware
pacman -S xf86-input-vmmouse xf86-video-vmware
pacman -S open-vm-tools
sudo systemctl enable vmtoolsd.service
sudo systemctl start vmtoolsd.service || true
sudo cp $scriptdir/mnt-hgfs.mount $scriptdir/mnt-hgfs.automount /etc/systemd/system/
sudo systemctl enable mnt-hgfs.automount
sudo systemctl start mnt-hgfs.automount || true