Dotfiles installer

This commit is contained in:
Anthony Axenov 2022-10-08 12:37:00 +08:00
parent 4637b069f9
commit bc9eb794a8
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
2 changed files with 29 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# Autogenerated at 05.10.2022 11:23 using ./gen-makefile
# Autogenerated at 08.10.2022 12:36 using ./gen-makefile
.DEFAULT_GOAL := help
#===============================================
@ -50,6 +50,10 @@ composer-clean:
docker:
@./install/docker
# Install dotfiles
dots:
@./install/dots
# Install droidcam v1.8.2
droidcam:
@./install/droidcam

24
install/dots Executable file
View File

@ -0,0 +1,24 @@
#!/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