From b858238684345a84d0a5f29792521149e38d1b3f Mon Sep 17 00:00:00 2001 From: Joseph Groocock Date: Thu, 31 Mar 2016 03:12:46 +0100 Subject: [PATCH] Add some setup scripts --- scripts/init-dotfiles.sh | 22 ++++++++++++++++++++++ scripts/install-pacaur.sh | 25 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100755 scripts/init-dotfiles.sh create mode 100755 scripts/install-pacaur.sh diff --git a/scripts/init-dotfiles.sh b/scripts/init-dotfiles.sh new file mode 100755 index 0000000..7634af9 --- /dev/null +++ b/scripts/init-dotfiles.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +cd $HOME +echo cd `pwd` + +files=`ls -A $DOTFILES | awk '/^\..*/ && !/\.config$/ && !/\.git$/'` +homepath=`echo $DOTFILES | sed "s|$HOME/||g"` +conffiles=`ls -A "$DOTFILES/.config"` +confpath=`echo $homepath | sed "s|.config/||g"` + +for file in $files; do + ln -sfv $homepath/$file . +done +ln -sfv .profile .zprofile + +mkdir -p .config && cd .config/ +echo cd `pwd` +for file in $conffiles; do + ln -sfv $confpath/.config/$file . +done + diff --git a/scripts/install-pacaur.sh b/scripts/install-pacaur.sh new file mode 100755 index 0000000..438922e --- /dev/null +++ b/scripts/install-pacaur.sh @@ -0,0 +1,25 @@ +if [[ $EUID -eq 0 ]]; then + echo "You cannot run makepkg as root." + echo "Please run this script again as a non-elevated user" + exit 1 +fi + +# Install dependencies +sudo pacman -S --asdeps git curl yajl gnupg + +mkdir cower && cd cower + +# Get PGP keys so it builds +gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53 + +# Fetch, build and install cower +curl https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower > PKGBUILD +makepkg -sri + +# Fetch, build and install pacaur +cd .. && mkdir pacaur && cd pacaur +curl https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur > PKGBUILD +makepkg -sri + +cd .. +rm -rf cower pacaur