aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-04-09 14:28:44 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-04-09 14:28:44 +1200
commit53e3630f8234eae75b219914f3f78054eb989584 (patch)
tree71e63f6487a1608d43d36eae5af408365713b360
parentd48f40ec6e8bdfef99cbe8632244e83fe8e38553 (diff)
downloaddotfiles-53e3630f8234eae75b219914f3f78054eb989584.tar.gz
dotfiles-53e3630f8234eae75b219914f3f78054eb989584.zip
Restructure shell install and check
-rw-r--r--Makefile58
-rw-r--r--check/login-shell.sh12
2 files changed, 42 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index e726a2be..8a363e89 100644
--- a/Makefile
+++ b/Makefile
@@ -35,9 +35,9 @@
install-tmux \
install-urxvt \
install-vim \
- install-gvim \
+ install-vim-gui \
install-vim-config \
- install-gvim-config \
+ install-vim-gui-config \
install-vim-plugins \
install-vim-pathogen \
install-x \
@@ -48,6 +48,7 @@
check-bin \
check-games \
check-ksh \
+ check-login-shell \
check-sh \
check-urxvt \
check-yash \
@@ -57,9 +58,9 @@
lint-bin \
lint-games \
lint-ksh \
- lint-yash \
lint-sh \
- lint-urxvt
+ lint-urxvt \
+ lint-yash
.SUFFIXES:
.SUFFIXES: .awk .bash .pl .sed .sh
@@ -271,7 +272,7 @@ install-abook:
mkdir -p -- $(HOME)/.abook
cp -p -- abook/abookrc $(HOME)/.abook
-install-bash: install-sh
+install-bash: check-bash install-sh
mkdir -p -- $(HOME)/.bashrc.d $(HOME)/.bash_completion.d $(HOME)/.config
cp -p -- bash/bashrc $(HOME)/.bashrc
cp -p -- bash/bashrc.d/* $(HOME)/.bashrc.d
@@ -355,13 +356,13 @@ install-newsbeuter:
install-mysql:
cp -p -- mysql/my.cnf $(HOME)/.my.cnf
-install-ksh: install-sh
+install-ksh: check-ksh install-sh
mkdir -p -- $(HOME)/.shrc.d $(HOME)/.kshrc.d
cp -p -- ksh/shrc.d/* $(HOME)/.shrc.d
cp -p -- ksh/kshrc $(HOME)/.kshrc
cp -p -- ksh/kshrc.d/* $(HOME)/.kshrc.d
-install-login-shell:
+install-login-shell: check-login-shell
sh dist/install-login-shell.sh
install-perlcritic:
@@ -376,7 +377,7 @@ install-psql:
install-readline:
cp -p -- readline/inputrc $(HOME)/.inputrc
-install-sh:
+install-sh: check-sh
mkdir -p -- $(HOME)/.profile.d $(HOME)/.shrc.d
cp -p -- sh/profile $(HOME)/.profile
cp -p -- sh/profile.d/* $(HOME)/.profile.d
@@ -404,13 +405,13 @@ install-vim: install-vim-config \
install-vim-plugins \
install-vim-pathogen
-install-gvim: install-vim \
- install-gvim-config
-
install-vim-config:
cp -p -- vim/vimrc $(HOME)/.vimrc
-install-gvim-config:
+install-vim-gui: install-vim \
+ install-vim-gui-config
+
+install-vim-gui-config:
cp -p -- vim/gvimrc $(HOME)/.gvimrc
install-vim-plugins: install-vim-config
@@ -435,25 +436,23 @@ install-x:
cp -p -- X/Xresources $(HOME)/.Xresources
cp -p -- X/Xresources.d/* $(HOME)/.Xresources.d
-install-yash: install-sh
+install-yash: install-yash install-sh
mkdir -p -- $(HOME)/.yashrc.d
cp -p -- yash/yash_profile $(HOME)/.yash_profile
cp -p -- yash/yashrc $(HOME)/.yashrc
cp -p -- yash/yashrc.d/* $(HOME)/.yashrc.d
-install-zsh: install-sh
+install-zsh: check-zsh install-sh
mkdir -p -- $(HOME)/.profile.d $(HOME)/.zshrc.d
cp -p -- zsh/profile.d/* $(HOME)/.profile.d
cp -p -- zsh/zprofile $(HOME)/.zprofile
cp -p -- zsh/zshrc $(HOME)/.zshrc
cp -p -- zsh/zshrc.d/* $(HOME)/.zshrc.d
-check: check-bash \
- check-bin \
- check-games \
+check: check-bin \
+ check-login-shell \
check-man \
- check-sh \
- check-urxvt
+ check-sh
check-bash:
sh check/bash.sh
@@ -470,6 +469,9 @@ check-man:
check-ksh:
sh check/ksh.sh
+check-login-shell:
+ sh check/login-shell.sh
+
check-sh:
sh check/sh.sh
@@ -482,32 +484,32 @@ check-yash:
check-zsh:
sh check/zsh.sh
-lint: check \
- lint-bash \
+lint: lint-bash \
lint-bin \
lint-games \
lint-ksh \
lint-sh \
lint-urxvt \
+ lint-x \
lint-yash
-lint-bash:
+lint-bash: check-bash
sh lint/bash.sh
-lint-bin:
+lint-bin: check-bin
sh lint/bin.sh
-lint-games:
+lint-games: check-games
sh lint/games.sh
-lint-ksh:
+lint-ksh: check-ksh
sh lint/ksh.sh
-lint-sh:
+lint-sh: check-sh
sh lint/sh.sh
-lint-urxvt:
+lint-urxvt: check-urxvt
sh lint/urxvt.sh
-lint-yash:
+lint-yash: check-yash
sh lint/yash.sh
diff --git a/check/login-shell.sh b/check/login-shell.sh
new file mode 100644
index 00000000..20327b94
--- /dev/null
+++ b/check/login-shell.sh
@@ -0,0 +1,12 @@
+target=check-sh
+case ${SHELL##*/} in
+ bash)
+ target=check-bash ;;
+ ksh|ksh88|ksh93|mksh|pdksh)
+ target=check-ksh ;;
+ yash)
+ target=check-yash ;;
+ zsh)
+ target=check-zsh ;;
+esac
+make "$target"