my-env/install/dots

25 lines
582 B
Plaintext
Raw Normal View History

2022-10-08 04:37:00 +00:00
#!/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