1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Add some setup scripts

This commit is contained in:
Joe Groocock 2016-03-31 03:12:46 +01:00
parent 95ee94e21c
commit b858238684
2 changed files with 47 additions and 0 deletions

22
scripts/init-dotfiles.sh Executable file
View File

@ -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

25
scripts/install-pacaur.sh Executable file
View File

@ -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