aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile143
-rw-r--r--README.markdown24
l---------vim/autoload/pathogen.vim1
3 files changed, 68 insertions, 100 deletions
diff --git a/Makefile b/Makefile
index 03dad7b2..ca4283d1 100644
--- a/Makefile
+++ b/Makefile
@@ -14,136 +14,109 @@ install : install-bash \
install-vim
install-bash : test-bash
- mkdir -p $(HOME)/.config
- rm -f $(HOME)/.bashrc $(HOME)/.bash_profile \
- $(HOME)/.bash_logout $(HOME)/.config/bash_completion
- rm -fr $(HOME)/.bashrc.d
- ln -s $(PWD)/bash/bashrc $(HOME)/.bashrc
- ln -s $(PWD)/bash/bashrc.d $(HOME)/.bashrc.d
- ln -s $(PWD)/bash/bash_profile $(HOME)/.bash_profile
- ln -s $(PWD)/bash/bash_logout $(HOME)/.bash_logout
- ln -s $(PWD)/bash/bash_completion $(HOME)/.config/bash_completion
+ install -d $(HOME)/.config $(HOME)/.bashrc.d
+ install bash/bashrc $(HOME)/.bashrc
+ install bash/bashrc.d/* $(HOME)/.bashrc.d
+ install bash/bash_profile $(HOME)/.bash_profile
+ install bash/bash_logout $(HOME)/.bash_logout
+ install bash/bash_completion $(HOME)/.config/bash_completion
install-bin : test-bin
- mkdir -p $(HOME)/.local/bin
- for bin in $(PWD)/bin/* ; do \
- rm -f $(HOME)/.local/bin/"$${bin##*/}" ; \
- ln -s "$$bin" $(HOME)/.local/bin/"$${bin##*/}" ; \
- done
- for man in $(PWD)/man/* ; do \
- mkdir -p $(HOME)/.local/share/man/man"$${man##*.}" ; \
- rm -f $(HOME)/.local/share/man/man"$${man##*.}"/"$${man##*/}" ; \
- ln -s "$$man" $(HOME)/.local/share/man/man"$${man##*.}"/"$${man##*/}" ; \
- done
+ install -d $(HOME)/.local/bin $(HOME)/.local/share/man/man1
+ install bin/* $(HOME)/.local/bin
+ install man/* $(HOME)/.local/share/man/man1
install-curl :
- rm -f $(HOME)/.curlrc
- ln -s $(PWD)/curl/curlrc $(HOME)/.curlrc
+ install curl/curlrc $(HOME)/.curlrc
install-dircolors :
- rm -f $(HOME)/.dircolors
- ln -s $(PWD)/dircolors/dircolors $(HOME)/.dircolors
+ install dircolors/dircolors $(HOME)/.dircolors
install-git :
- rm -f $(HOME)/.gitconfig
- ln -s $(PWD)/git/gitconfig $(HOME)/.gitconfig
+ install git/gitconfig $(HOME)/.gitconfig
install-gnupg :
- mkdir -p $(HOME)/.gnupg
- rm -f $(HOME)/.gnupg/gpg.conf $(HOME)/.gnupg/gpg-agent.conf
- ln -s $(PWD)/gnupg/gpg.conf $(HOME)/.gnupg/gpg.conf
- ln -s $(PWD)/gnupg/gpg-agent.conf $(HOME)/.gnupg/gpg-agent.conf
+ install -m 0700 -d $(HOME)/.gnupg
+ install -m 0600 gnupg/*.conf $(HOME)/.gnupg
install-i3 :
- mkdir -p $(HOME)/.i3
- rm -f $(HOME)/.i3/config $(HOME)/.i3/status $(HOME)/.i3/draugen.jpg
- ln -s $(PWD)/i3/config $(HOME)/.i3/config
- ln -s $(PWD)/i3/status $(HOME)/.i3/status
- ln -s $(PWD)/i3/draugen.jpg $(HOME)/.i3/draugen.jpg
+ install -d $(HOME)/.i3
+ install i3/* $(HOME)/.i3
install-mutt :
- mkdir -p $(HOME)/.mutt $(HOME)/.cache/mutt
- mkdir -p $(HOME)/Mail/inbox/cur \
+ install -d $(HOME)/.mutt \
+ $(HOME)/.cache/mutt \
+ $(HOME)/Mail/inbox/cur \
$(HOME)/Mail/inbox/new \
- $(HOME)/Mail/inbox/tmp
- mkdir -p $(HOME)/Mail/sent/cur \
+ $(HOME)/Mail/inbox/tmp \
+ $(HOME)/Mail/sent/cur \
$(HOME)/Mail/sent/new \
$(HOME)/Mail/sent/tmp
- rm -f $(HOME)/.muttrc
- ln -s $(PWD)/mutt/muttrc $(HOME)/.muttrc
+ install mutt/muttrc $(HOME)/.muttrc
touch $(HOME)/.mutt/muttrc.local $(HOME)/.mutt/signature
install-ncmcpp :
- mkdir -p $(HOME)/.ncmpcpp
- rm -f $(HOME)/.ncmpcpp/config
- ln -s $(PWD)/ncmpcpp/config $(HOME)/.ncmpcpp/config
+ install -d $(HOME)/.ncmpcpp
+ install ncmpcpp/config $(HOME)/.ncmpcpp/config
install-newsbeuter :
- mkdir -p $(HOME)/.config/newsbeuter $(HOME)/.local/share/newsbeuter
- rm -f $(HOME)/.config/newsbeuter/config
- ln -s $(PWD)/newsbeuter/config $(HOME)/.config/newsbeuter/config
+ install -d $(HOME)/.config/newsbeuter $(HOME)/.local/share/newsbeuter
+ install newsbeuter/config $(HOME)/.config/newsbeuter/config
install-mysql :
- rm -f $(HOME)/.my.cnf
- ln -s $(PWD)/mysql/my.cnf $(HOME)/.my.cnf
+ install mysql/my.cnf $(HOME)/.my.cnf
install-psql :
- rm -f $(HOME)/.psqlrc
- ln -s $(PWD)/psql/psqlrc $(HOME)/.psqlrc
+ install psql/psqlrc $(HOME)/.psqlrc
install-readline :
- rm -f $(HOME)/.inputrc
- ln -s $(PWD)/readline/inputrc $(HOME)/.inputrc
+ install readline/inputrc $(HOME)/.inputrc
install-sh : test-sh
- rm -f $(HOME)/.profile
- rm -fr $(HOME)/.profile.d
- ln -s $(PWD)/sh/profile $(HOME)/.profile
- ln -s $(PWD)/sh/profile.d $(HOME)/.profile.d
+ install -d $(HOME)/.profile.d
+ install sh/profile $(HOME)/.profile
+ install sh/profile.d/* $(HOME)/.profile.d
install-terminfo :
- for info in $(PWD)/terminfo/*.info ; do tic "$$info" ; done
+ for info in terminfo/*.info ; do tic "$$info" ; done
install-task :
- rm -f $(HOME)/.taskrc
- ln -s $(PWD)/task/taskrc $(HOME)/.taskrc
+ install task/taskrc $(HOME)/.taskrc
install-tmux :
- rm -f $(HOME)/.tmux.conf
- ln -s $(PWD)/tmux/tmux.conf $(HOME)/.tmux.conf
+ install tmux/tmux.conf $(HOME)/.tmux.conf
install-urxvt : test-urxvt
- mkdir -p $(HOME)/.urxvt
- rm -fr $(HOME)/.urxvt/clip/ext
- ln -s $(PWD)/urxvt/ext $(HOME)/.urxvt/ext
+ install -d $(HOME)/.urxvt/ext
+ install urxvt/ext/* $(HOME)/.urxvt/ext
install-vim :
- mkdir -p $(HOME)/.vim
- rm -fr $(HOME)/.vim/after $(HOME)/.vim/autoload $(HOME)/.vim/bundle
- rm -f $(HOME)/.vimrc $(HOME)/.gvimrc
- ln -s $(PWD)/vim/after $(HOME)/.vim/after
- ln -s $(PWD)/vim/autoload $(HOME)/.vim/autoload
- ln -s $(PWD)/vim/bundle $(HOME)/.vim/bundle
- ln -s $(PWD)/vim/vimrc $(HOME)/.vimrc
- ln -s $(PWD)/vim/gvimrc $(HOME)/.gvimrc
- (cd $(PWD) && git submodule update --init)
+ install -d $(HOME)/.vim/after/ftplugin \
+ $(HOME)/.vim/after/plugin \
+ $(HOME)/.vim/autoload \
+ $(HOME)/.vim/bundle
+ install vim/vimrc $(HOME)/.vimrc
+ install vim/gvimrc $(HOME)/.gvimrc
+ install vim/after/ftplugin/* $(HOME)/.vim/after/ftplugin
+ install vim/after/plugin/* $(HOME)/.vim/after/plugin
+ git submodule update --init
+ cp -fR vim/bundle/* $(HOME)/.vim/bundle
+ rm -f $(HOME)/.vim/after/pathogen.vim
+ ln -s $(HOME)/.vim/bundle/pathogen/autoload/pathogen.vim $(HOME)/.vim/after/pathogen.vim
install-wyrd :
- rm -f $(HOME)/.wyrdrc
- ln -s $(PWD)/wyrd/wyrdrc $(HOME)/.wyrdrc
+ install wyrd/wyrdrc $(HOME)/.wyrdrc
install-x : install-i3
- rm -f $(HOME)/.Xmodmap $(HOME)/.Xresources \
- $(HOME)/.xsession $(HOME)/.xsessionrc
- ln -s $(PWD)/X/Xmodmap $(HOME)/.Xmodmap
- ln -s $(PWD)/X/Xresources $(HOME)/.Xresources
- ln -s $(PWD)/X/xsession $(HOME)/.xsession
- ln -s $(PWD)/X/xsessionrc $(HOME)/.xsessionrc
+ install X/Xmodmap $(HOME)/.Xmodmap
+ install X/Xresources $(HOME)/.Xresources
+ install X/xsession $(HOME)/.xsession
+ install X/xsessionrc $(HOME)/.xsessionrc
test : test-sh test-bash test-bin test-urxvt
test-sh :
- @for sh in $(PWD)/sh/* $(PWD)/sh/profile.d/* ; do \
+ @for sh in sh/* sh/profile.d/* ; do \
if [ -f "$$sh" ] && ! sh -n "$$sh" ; then \
exit 1 ; \
fi \
@@ -151,7 +124,7 @@ test-sh :
@echo "All sh(1) scripts parsed successfully."
test-bash :
- @for bash in $(PWD)/bash/* $(PWD)/bash/bashrc.d/* ; do \
+ @for bash in bash/* bash/bashrc.d/* ; do \
if [ -f "$$bash" ] && ! bash -n "$$bash" ; then \
exit 1 ; \
fi \
@@ -159,7 +132,7 @@ test-bash :
@echo "All bash(1) scripts parsed successfully."
test-bin :
- @for bin in $(PWD)/bin/* ; do \
+ @for bin in bin/* ; do \
if sed 1q "$$bin" | grep -q bash ; then \
bash -n "$$bin" || exit 1 ; \
elif sed 1q "$$bin" | grep -q sh ; then \
@@ -169,7 +142,7 @@ test-bin :
@echo "All shell scripts in bin parsed successfully."
test-urxvt:
- @for perl in $(PWD)/urxvt/ext/* ; do \
+ @for perl in urxvt/ext/* ; do \
perl -c "$$perl" >/dev/null || exit 1 ; \
done
@echo "All Perl scripts in urxvt/ext parsed successfully."
diff --git a/README.markdown b/README.markdown
index a6716521..2442bd40 100644
--- a/README.markdown
+++ b/README.markdown
@@ -64,9 +64,15 @@ the defaults.
Installation
------------
-The installation `Makefile` will delete things standing in the way of its
-symbolic links, so read the output of `make -n install` first to make sure you
-aren’t going to lose anything unexpected.
+The installation `Makefile` will overwrite things standing in the way of its
+installed files without backing them up, so read the output of `make -n
+install` first to make sure you aren’t going to lose anything unexpected. Even
+better, if you’re still not sure, give it a temporary directory to which it can
+install to check things out:
+
+ $ mktemp -d
+ /tmp/tmp.YZFW8ScFZP
+ $ make install HOME=/tmp/tmp.YZFW8ScFZP
You’ll need to have a recent enough version of Git to support
[submodules](http://git-scm.com/book/en/Git-Tools-Submodules) for the Vim
@@ -109,17 +115,7 @@ My `.bash_profile` calls `.profile` for variable exports, and then runs
`.bashrc` for interactive shells. Subscripts are kept in `.bashrc.d`, and all
are loaded for the creation of any new interactive shell. The contents of this
directory changes all the time depending on the host, and only specific scripts
-in it are versioned; the rest are ignored locally:
-
-```bash
-$ git ls-files --others --exclude-standard >>.git/info/exclude
-```
-
-There’s an `others` alias for the above command in `~/.gitconfig`:
-
-```bash
-$ git others >>.git/info/exclude
-```
+in it are versioned.
My interactive and scripting shell of choice is Bash; as a GNU/Linux admin who
ends up installing Bash on BSD machines anyway, I very rarely have to write
diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim
deleted file mode 120000
index a202405f..00000000
--- a/vim/autoload/pathogen.vim
+++ /dev/null
@@ -1 +0,0 @@
-../bundle/pathogen/autoload/pathogen.vim \ No newline at end of file