Solved merge conflict

This commit is contained in:
Tristaan
2017-11-17 04:56:09 +01:00

View File

@@ -1,40 +1,39 @@
#!/bin/bash #!/bin/bash
# Dotfiles installer SCRIPT_DIR=$(readlink -f ${0%/*})
realpath() { for var in "$@"
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" do
} if [[ $var == "-u"]]; then
sudo pacman -Syyu
safe_link(){ fi
local src="$1" if [[ $var == "-ii"]]; then
local dest="$HOME/`basename $src`" sudo pacman -S wget
[ ! -e "$dest" ] && ln -sf "$src" "$dest"
}
if [[ $1== 'initialize' ]]; then
cd ~/build
wget https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz wget https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
wget https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz wget https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
tar -xvf package-query.tar.gz &
tar -xvf yaourt.tar.gz tar -xvf yaourt.tar.gz
tar -xvf package-query.tar.gz
cd package-query cd package-query
makepkg -sri makepkg -sri
cd ../yaourt cd ../yaourt
makepkg -sri makepkg -sri
cd .. cd ..
rm -R yaourt* package-query* rm package-query* yaourt*
symlink_dotfiles()
sudo yaourt -S zsh zsh-syntax-highlighting i3blocks neovim i3-wm i3lock-color-git ctags
fi fi
# Get root
SCRIPT_PATH=`realpath $0`
DOTFILES=`dirname $SCRIPT_PATH`
# Install bin scripts
safe_link "$DOTFILES/bin"
# Initialize and update submodules (for vim plugins)
git submodule init
git submodule update
# Install other dotfiles
for f in `ls -A $DOTFILES`; do
safe_link "$DOTFILES/$f"
done done
function symlink_dotfiles {
ln -s .i3 $HOME/.i3
ln -s .vim $HOME/.config/nvim
ln -s .Xresources $HOME/.Xresources
ln -s .dmrc $HOME/.dmrc
for file in .config/* do
ln -s $file "${HOME}${file}"
done
ln -s .gitconfig $HOME/.gitconfig
ln -s .oh-my-zsh $HOME/.oh-my-zsh
ln -s .zshrc $HOME/.zshrc
}