2021-07-03 18:54:50 +00:00
|
|
|
###############################################################################
|
|
|
|
# Tyler Perkins
|
|
|
|
# 2-7-21
|
|
|
|
# Makefile
|
|
|
|
#
|
|
|
|
|
|
|
|
SRC = ./src
|
2021-08-06 16:13:32 +00:00
|
|
|
PROGRAMS = calcurse nvim newsboat mpv bash compton
|
2021-07-03 18:54:50 +00:00
|
|
|
|
|
|
|
.PHONY : install update clean
|
|
|
|
|
|
|
|
install :
|
2021-08-06 16:13:32 +00:00
|
|
|
#nvim
|
|
|
|
@which nvim > /dev/null 2>&1
|
2021-07-03 18:54:50 +00:00
|
|
|
@if [ $$? -eq 0 ]; then \
|
2021-08-06 16:13:32 +00:00
|
|
|
echo "nvim found! Installing .vimrc ..."; \
|
|
|
|
[ -f ~/.config/nvim/init.vim ] && mv ~/.config/nvim/init.vim ~/.config/nvim/init.vim.old; \
|
|
|
|
cp $(SRC)/vim/vimrc ~/.config/nvim/init.vim; \
|
2021-07-03 18:54:50 +00:00
|
|
|
fi
|
|
|
|
#bash
|
|
|
|
@which bash > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "bash found! Installing .bashrc ..."; \
|
|
|
|
[ -f ~/.bashrc ] && mv ~/.bashrc ~/.bashrc.old; \
|
|
|
|
cp $(SRC)/bash/bashrc ~/.bashrc; \
|
|
|
|
fi
|
|
|
|
#calcurse
|
|
|
|
@which calcurse > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "calcurse found! Installing configs..."; \
|
|
|
|
[ -f ~/.config/calcurse/conf ] && mv ~/.config/calcurse/conf ~/.config/calcurse/conf.old; \
|
|
|
|
cp $(SRC)/calcurse/conf ~/.config/calcurse/conf; \
|
|
|
|
[ -f ~/.config/calcurse/keys ] && mv ~/.config/calcurse/keys ~/.config/calcurse/keys.old; \
|
|
|
|
cp $(SRC)/calcurse/keys ~/.config/calcurse/keys; \
|
|
|
|
fi
|
|
|
|
#newsboat
|
|
|
|
@which newsboat > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "newsboat found! Installing config and urls..."; \
|
|
|
|
[ -f ~/.newsboat/config ] && mv ~/.newsboat/config ~/.newsboat/config.old; \
|
|
|
|
cp $(SRC)/newsboat/config ~/.newsboat/config; \
|
|
|
|
[ -f ~/.newsboat/urls ] && mv ~/.newsboat/urls ~/.newsboat/urls.old; \
|
|
|
|
cp $(SRC)/newsboat/urls ~/.newsboat/urls; \
|
|
|
|
fi
|
|
|
|
#mpv
|
|
|
|
@which mpv > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "mpv found! Installing config..."; \
|
|
|
|
[ -f ~/.config/mpv/mpv.conf ] && mv ~/.config/mpv/mpv.conf ~/.config/mpv/mpv.conf.old; \
|
|
|
|
cp $(SRC)/mpv/mpv.conf ~/.config/mpv/mpv.conf; \
|
|
|
|
fi
|
|
|
|
#compton
|
|
|
|
@which compton > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "compton found! Installing config, changes will not take effect till compton is restarted..."; \
|
|
|
|
[ -f ~/.config/compton.conf ] && mv ~/.config/compton.conf ~/.config/compton.conf.old; \
|
|
|
|
cp $(SRC)/compton/compton.conf ~/.config/compton.conf; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
update:
|
|
|
|
#vim
|
2021-08-06 16:13:32 +00:00
|
|
|
@which nvim > /dev/null 2>&1
|
2021-07-03 18:54:50 +00:00
|
|
|
@if [ $$? -eq 0 ]; then \
|
2021-08-06 16:13:32 +00:00
|
|
|
echo "nvim found! Updating vimrc files with existing versions..."; \
|
|
|
|
[ -f ~/.config/nvim/init.vim ] && cp ~/.config/nvim/init.vim $(SRC)/vim/vimrc; \
|
2021-07-03 18:54:50 +00:00
|
|
|
fi
|
|
|
|
#bash
|
|
|
|
@which bash > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "bash found! Updating bashrc files with existing versions..."; \
|
|
|
|
[ -f ~/.bashrc ] && cp ~/.bashrc $(SRC)/bash/bashrc; \
|
|
|
|
fi
|
|
|
|
#calcurse
|
|
|
|
@which calcurse > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "calcurse found! Updating config files with existing versions..."; \
|
|
|
|
[ -f ~/.config/calcurse/conf ] && cp ~/.config/calcurse/conf $(SRC)/calcurse/conf; \
|
|
|
|
[ -f ~/.config/calcurse/keys ] && cp ~/.config/calcurse/keys $(SRC)/calcurse/keys; \
|
|
|
|
fi
|
|
|
|
#newsboat
|
|
|
|
@which newsboat > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "newsboat found! Updating config files with existing versions..."; \
|
|
|
|
[ -f ~/.newsboat/config ] && cp ~/.newsboat/config $(SRC)/newsboat/config; \
|
|
|
|
[ -f ~/.newsboat/urls ] && cp ~/.newsboat/urls $(SRC)/newsboat/urls; \
|
|
|
|
fi
|
|
|
|
#mpv
|
|
|
|
@which mpv > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "mpv found! Updating config files with existing versions..."; \
|
|
|
|
[ -f ~/.config/mpv/mpv.conf ] && cp ~/.config/mpv/mpv.conf $(SRC)/mpv/mpv.conf; \
|
|
|
|
fi
|
|
|
|
#compton
|
|
|
|
@which compton > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "compton found! Updating config files with existing versions..."; \
|
|
|
|
[ -f ~/.config/compton.conf ] && cp ~/.config/compton.conf $(SRC)/compton/compton.conf; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
clean :
|
|
|
|
#vim
|
2021-08-06 16:13:32 +00:00
|
|
|
@which nvim > /dev/null 2>&1
|
2021-07-03 18:54:50 +00:00
|
|
|
@if [ $$? -eq 0 ]; then \
|
2021-08-06 16:13:32 +00:00
|
|
|
echo "nvim found! removing existing config files and reinstalling *.old"; \
|
|
|
|
[ -f ~/.config/nvim/init.vim.old ] && mv ~/.config/nvim/init.vim.old ~/.config/nvim/init.vim; \
|
2021-07-03 18:54:50 +00:00
|
|
|
fi
|
|
|
|
#bash
|
|
|
|
@which bash > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "bash found! removing existing config files and reinstalling *.old"; \
|
|
|
|
[ -f ~/.bashrc.old ] && mv ~/.bashrc.old ~/.bashrc; \
|
|
|
|
fi
|
|
|
|
#calcurse
|
|
|
|
@which calcurse > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "calcurse found! remvoing existing config files and reinstalling *.old"; \
|
|
|
|
[ -f ~/.config/calcurse/conf.old ] && mv ~/.config/calurse/conf.old ~/.config/calcurse/conf; \
|
|
|
|
[ -f ~/.config/calcurse/keys.old ] && mv ~/.config/calurse/keys.old ~/.config/calcurse/keys; \
|
|
|
|
fi
|
|
|
|
#newsboat
|
|
|
|
@which newsboat > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "newsboat found! removing existing config files and reinstalling *.old"; \
|
|
|
|
[ -f ~/.newsboat/config.old ] && mv ~/.newsboat/config.old ~/.newsboat/config; \
|
|
|
|
[ -f ~/.newsboat/urls.old ] && mv ~/.newsboat/urls.old ~/.newsboat/urls; \
|
|
|
|
fi
|
|
|
|
#mpv
|
|
|
|
@which mpv > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "mpv found! removing existing config files and reinstalling *.old"; \
|
|
|
|
[ -f ~/.config/mpv/mpv.conf.old ] && mv ~/.config/mpv/mpv.conf.old ~/.config/mpv/mpv.conf; \
|
|
|
|
fi
|
|
|
|
#compton
|
|
|
|
@which compton > /dev/null 2>&1
|
|
|
|
@if [ $$? -eq 0 ]; then \
|
|
|
|
echo "compton found! remvoing existing confi files and reinstalling *.old"; \
|
|
|
|
[ -f ~/.config/compton.old ] && mv ~/.config/compton.conf.old ~/.config/compton.conf; \
|
|
|
|
fi
|