dotfiles misc
This commit is contained in:
parent
ed10ab05d4
commit
def4f6761a
27
install/dots
27
install/dots
@ -1,25 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install dotfiles
|
##makedesc: Install dotfiles
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
echo
|
title
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing dotfiles..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
dotfiles_src_dir="`dirname $install_dir`/dotfiles"
|
dotfiles_src_dir="`dirname $install_dir`/dotfiles"
|
||||||
postfix=".bak-`date '+%Y%m%d%H%M'`"
|
postfix=".bak-`date '+%Y%m%d%H%M'`"
|
||||||
|
|
||||||
install() {
|
install_dotfile() {
|
||||||
echo "mv "$HOME/$1" "$HOME/$1$postfix""
|
mv "$HOME/$1" "$HOME/$1$postfix"
|
||||||
echo "cp "$dotfiles_src_dir/$1" "$HOME/$1""
|
cp "$dotfiles_src_dir/$1" "$HOME/$1"
|
||||||
echo "- $1"
|
success "- $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
install .bash_aliases
|
install_dotfile ".bash_aliases" && \
|
||||||
install .profile
|
install_dotfile ".profile" && \
|
||||||
install .bashrc
|
install_dotfile ".bashrc" && \
|
||||||
install .gitconfig
|
install_dotfile ".gitconfig" && \
|
||||||
install .gitignore
|
install_dotfile ".gitignore" && \
|
||||||
install .git_aliases
|
install_dotfile ".git_aliases"
|
||||||
|
Loading…
Reference in New Issue
Block a user