commit 997fcff814b920b5c5fa2982a6265a96e1d6ed8d (patch)
Author: Alex Karle <firstname.lastname@example.org>
Date: Sun, 8 Dec 2019 23:46:12 -0500
install: don't use custom dotfile manager
I found that I was setting up my dotfiles on quite a few new accounts
recently (mostly due to exploring different OSs). When I get a new
machine / account, I want to be able to install the basics (and a few
extras) without needing the dependency on my dotfile manager (or even
git or bash).
2 files changed, 43 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
@@ -11,3 +11,6 @@ I'm a big believer in the "do it yourself" style of dotfiles. Fork if you'd
like, but don't blindly copy!
These configs work for me, but [definitely aren't for everyone](./vc/README.md).
+This all said, [install.sh](./install.sh) is how I set up a new machine /
diff --git a/install.sh b/install.sh
@@ -1,21 +1,45 @@
-# simple install via dotfiler
-# PREREQS: git
+# Minimal install (no prereqs, just the basics)
+# Intended to be run on a new account, NOT for long term management
+# However, should be safe to rerun to fix/tune-up an existing install
-if ! [ -x "$(command -v git)" ]; then
- echo "Error: git is not installed. Aborting..." >&2
- exit 1
+DOTFILES="$( cd "$(dirname "$0")" ; pwd -P )"
-mkdir -p $HOME/.config
-mkdir -p $HOME/dev/proj
+# ln with the right settings and a nicer message
+ if [ -e "$2" ]; then
+ if [ -h "$2" ]; then
+ ln -sfT $1 $2
+ echo "[Updated Link] $2" | sed "s#$HOME#~#"
+ echo "[Fail:Exists ] $2" | sed "s#$HOME#~#"
+ # Use 'T' to prevent nesting if the dir already exists
+ ln -sT $1 $2
+ echo "[New ] $2" | sed "s#$HOME#~#"
+# Top level dirs
+try_ln $DOTFILES/vim $HOME/.vim
-echo "Installing dotfiler -> $HOME/dev/proj/dotfiler"
-git clone https://github.com/akarle/dotfiler $HOME/dev/proj/dotfiler || exit 1
+# bin scripts
+mkdir -p $HOME/bin
+for f in $DOTFILES/bin/*; do
+ try_ln $f $HOME/bin/`basename $f`
-echo "Using dotfiler to link bash (bare minimum)"
-dotfiler.pl -d $HOME/dev/dotfiles -l bash tmux
+# XDG_CONFIG_HOME dirs
+mkdir -p $HOME/.config
+for d in mutt offlineimap git nvim; do
+ try_ln $DOTFILES/$d $HOME/.config/$d
-# dotfiler doesn't support .vim yet...
-ln -s $HOME/dev/dotfiles/vim $HOME/.vim
+# Traditional dotfiles
+for d in bash tmux gdb X11; do
+ for f in $DOTFILES/$d/*; do
+ try_ln $f $HOME/.`basename $f`