aboutsummaryrefslogtreecommitdiffstats
path: root/bash/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'bash/Makefile')
-rw-r--r--bash/Makefile33
1 files changed, 16 insertions, 17 deletions
diff --git a/bash/Makefile b/bash/Makefile
index 39dd6d3..bb25967 100644
--- a/bash/Makefile
+++ b/bash/Makefile
@@ -1,21 +1,20 @@
.POSIX:
-include ../common.mk
install:
mkdir -p -- ~/.var/cache
mkdir -p -- ~/.config/bash
touch -- ~/.var/cache/bash_history
- test ! -d ~/.bash_history
- test ! -d ~/.bash_logout
- test ! -d ~/.bash_profile
- test ! -d ~/.bashrc
- test ! -d ~/.config/bash/logout
- test ! -d ~/.config/bash/profile
- test ! -d ~/.config/bash/bashrc
- test ! -d ~/.config/bash/bashrc_palette
- test ! -d ~/.config/bash/bashrc_prompt
- test ! -d ~/.config/bash/aliases
- test ! -d ~/.config/bash/aliases-Zenith
+ test ! -e ~/.bash_history || test -L ~/.bash_history
+ test ! -e ~/.bash_logout || test -L ~/.bash_logout
+ test ! -e ~/.bash_profile || test -L ~/.bash_profile
+ test ! -e ~/.bashrc || test -L ~/.bashrc
+ test ! -e ~/.config/bash/logout || test -L ~/.config/bash/logout
+ test ! -e ~/.config/bash/profile || test -L ~/.config/bash/profile
+ test ! -e ~/.config/bash/bashrc || test -L ~/.config/bash/bashrc
+ test ! -e ~/.config/bash/bashrc_palette || test -L ~/.config/bash/bashrc_palette
+ test ! -e ~/.config/bash/bashrc_prompt || test -L ~/.config/bash/bashrc_prompt
+ test ! -e ~/.config/bash/aliases || test -L ~/.config/bash/aliases
+ test ! -e ~/.config/bash/aliases-Zenith || test -L ~/.config/bash/aliases-Zenith
ln -sf -- .var/cache/bash_history ~/.bash_history
ln -sf -- .config/bash/logout ~/.bash_logout
ln -sf -- .config/bash/profile ~/.bash_profile
@@ -28,13 +27,15 @@ install:
ln -sf -- ~/.dotfiles/bash/aliases ~/.config/bash/aliases
if test "$$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then \
test "$$(hostname)" = Zenith && \
- $(CHECK_INSTALLED) asroot && \
- $(CHECK_INSTALLED) gnupg && \
- $(CHECK_INSTALLED) cryptsetup && \
+ ../check-any-installed asroot asroot-libpassphrase && \
+ ../check-installed gnupg && \
+ ../check-installed cryptsetup && \
+ ../check-installed key2root && \
ln -sf -- ~/.dotfiles/bash/aliases-Zenith ~/.config/bash/aliases-Zenith; \
fi
uninstall:
+ +! ../check-installed bash
-unlink -- ~/.bash_history
-unlink -- ~/.bash_logout
-unlink -- ~/.bash_profile
@@ -50,5 +51,3 @@ uninstall:
-rmdir -- ~/.config/bash/aliases.d
-rmdir -- ~/.config/bash/bashrc.d
-rmdir -- ~/.config/bash
-
-.PHONY: install uninstall