25 lines
582 B
Bash
Executable File
25 lines
582 B
Bash
Executable File
#!/bin/bash
|
|
##makedesc: Install dotfiles
|
|
|
|
echo
|
|
echo "==============================================="
|
|
echo "Installing dotfiles..."
|
|
echo "==============================================="
|
|
echo
|
|
|
|
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
dotfiles_src_dir="`dirname $install_dir`/dotfiles"
|
|
postfix=".bak-`date '+%Y%m%d%H%M'`"
|
|
|
|
install() {
|
|
echo "mv "$HOME/$1" "$HOME/$1$postfix""
|
|
echo "cp "$dotfiles_src_dir/$1" "$HOME/$1""
|
|
echo "- $1"
|
|
}
|
|
|
|
install .bash_aliases
|
|
install .profile
|
|
install .gitconfig
|
|
install .gitignore
|
|
install .git_aliases
|