Add default profile to source bashrc on login shell, rewrite Makefile layout to be more logical
This commit is contained in:
parent
add9bdc2d1
commit
b15758ca82
9
.profile
Normal file
9
.profile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# ~/.profile: executed by Bourne-compatible login shells.
|
||||||
|
|
||||||
|
if [ "$BASH" ]; then
|
||||||
|
if [ -f ~/.bashrc ]; then
|
||||||
|
. ~/.bashrc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
mesg n 2> /dev/null || true
|
37
Makefile
37
Makefile
|
@ -12,9 +12,9 @@ THEMES_TARGETS := $(THEMES_ITEMS:themes/%=$(THEMES_DIR)/%)
|
||||||
LAZY_REPO := https://github.com/folke/lazy.nvim.git
|
LAZY_REPO := https://github.com/folke/lazy.nvim.git
|
||||||
PYENV_DIR := $(if $(PYENV_ROOT), $(PYENV_ROOT), $(HOME)/.pyenv)
|
PYENV_DIR := $(if $(PYENV_ROOT), $(PYENV_ROOT), $(HOME)/.pyenv)
|
||||||
|
|
||||||
.PHONY: default all clean check install
|
.PHONY: default all clean check directories link configure install
|
||||||
|
|
||||||
default: $(CONFIG_TARGETS) $(SSH_TARGETS) $(THEMES_TARGETS) $(LAZY_DIR) $(HOME)/.bashrc $(HOME)/.zshrc $(HOME)/.ssh/sockets config/nvim/.venv config/git/user_email
|
default: directories link configure
|
||||||
|
|
||||||
all: default install
|
all: default install
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ clean:
|
||||||
for link in $(SSH_TARGETS); do rm "$$link"; done
|
for link in $(SSH_TARGETS); do rm "$$link"; done
|
||||||
for link in $(THEMES_TARGETS); do rm "$$link"; done
|
for link in $(THEMES_TARGETS); do rm "$$link"; done
|
||||||
rm -rf $(LAZY_DIR)
|
rm -rf $(LAZY_DIR)
|
||||||
|
rm $(HOME)/.profile
|
||||||
rm $(HOME)/.bashrc
|
rm $(HOME)/.bashrc
|
||||||
rm $(HOME)/.zshrc
|
rm $(HOME)/.zshrc
|
||||||
rmdir $(HOME)/.ssh/sockets
|
rmdir $(HOME)/.ssh/sockets
|
||||||
|
@ -31,32 +32,38 @@ clean:
|
||||||
check:
|
check:
|
||||||
echo "Placeholder"
|
echo "Placeholder"
|
||||||
|
|
||||||
install:
|
directories: $(CONFIG_DIR) $(SSH_DIR) $(THEMES_DIR) $(HOME)/.ssh/sockets $(HOME)/.local/bin
|
||||||
command -v direnv > /dev/null || bin_path=$(HOME)/.local/bin bash packages/direnv.sh
|
|
||||||
command -v pipx > /dev/null || bash packages/pipx.sh
|
|
||||||
command -v poetry > /dev/null || python3 packages/poetry.py
|
|
||||||
command -v pyenv > /dev/null || bash packages/pyenv.sh
|
|
||||||
command -v starship > /dev/null || bash packages/starship.sh
|
|
||||||
|
|
||||||
config/git/user_email:
|
$(CONFIG_DIR) $(SSH_DIR) $(THEMES_DIR) $(HOME)/.ssh/sockets $(HOME)/.local/bin:
|
||||||
echo "Missing user_email; Add your email to $$(readlink -f config/git)/user_email"
|
mkdir -p $@
|
||||||
|
|
||||||
|
link: $(CONFIG_TARGETS) $(SSH_TARGETS) $(THEMES_TARGETS) $(HOME)/.profile $(HOME)/.bashrc $(HOME)/.zshrc
|
||||||
|
|
||||||
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
|
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
|
||||||
$(SSH_TARGETS): $(SSH_DIR)/%: ssh/%
|
$(SSH_TARGETS): $(SSH_DIR)/%: ssh/%
|
||||||
$(THEMES_TARGETS): $(THEMES_DIR)/%: themes/%
|
$(THEMES_TARGETS): $(THEMES_DIR)/%: themes/%
|
||||||
|
$(HOME)/.profile: $(HOME)/%: %
|
||||||
$(HOME)/.bashrc: $(HOME)/%: %
|
$(HOME)/.bashrc: $(HOME)/%: %
|
||||||
$(HOME)/.zshrc: $(HOME)/%: %
|
$(HOME)/.zshrc: $(HOME)/%: %
|
||||||
$(CONFIG_TARGETS) $(SSH_TARGETS) $(THEMES_TARGETS) $(HOME)/.bashrc $(HOME)/.zshrc:
|
$(CONFIG_TARGETS) $(SSH_TARGETS) $(THEMES_TARGETS) $(HOME)/.profile $(HOME)/.bashrc $(HOME)/.zshrc:
|
||||||
ln -s $(PWD)/$? $@
|
ln -s $(PWD)/$? $@
|
||||||
|
|
||||||
$(LAZY_DIR):
|
configure: config/git/user_email config/nvim/.venv
|
||||||
git clone --depth 1 $(LAZY_REPO) $@
|
|
||||||
|
config/git/user_email:
|
||||||
|
echo "Missing user_email; Add your email to $$(readlink -f config/git)/user_email"
|
||||||
|
|
||||||
config/nvim/.venv:
|
config/nvim/.venv:
|
||||||
python3 -m venv $@
|
python3 -m venv $@
|
||||||
$@/bin/python3 -m pip install -U pip wheel
|
$@/bin/python3 -m pip install -U pip wheel
|
||||||
$@/bin/python3 -m pip install --use-pep517 pynvim
|
$@/bin/python3 -m pip install --use-pep517 pynvim
|
||||||
|
|
||||||
|
install: $(LAZY_DIR)
|
||||||
|
command -v direnv > /dev/null || bin_path=$(HOME)/.local/bin bash packages/direnv.sh
|
||||||
|
command -v pipx > /dev/null || bash packages/pipx.sh
|
||||||
|
command -v poetry > /dev/null || python3 packages/poetry.py
|
||||||
|
command -v pyenv > /dev/null || bash packages/pyenv.sh
|
||||||
|
command -v starship > /dev/null || bash packages/starship.sh
|
||||||
|
|
||||||
$(CONFIG_DIR) $(SSH_DIR) $(THEMES_DIR) $(HOME)/.ssh/sockets $(HOME)/.local/bin:
|
$(LAZY_DIR):
|
||||||
mkdir -p $@
|
git clone --depth 1 $(LAZY_REPO) $@
|
||||||
|
|
Loading…
Reference in a new issue