diff --git a/README.md b/README.md index 5e5d342..ac80dc6 100755 --- a/README.md +++ b/README.md @@ -5,26 +5,28 @@ Clone this repo: $ git clone --recurse-submodules https://git.sr.ht/~jswank/dotfiles ``` -Install my dotfiles: -```console -$ ./install +But since you forgot to grab the submodules, get them now: +``` +$ git submodule update --init --recursive ``` -(which just runs: `ls -d */ | tr -d / | xargs stow -R`) +Install my dotfiles: +```console +$ ./install.sh +``` + +This will install most common dotfiles: if you want to install a set, provide +that as an argument: +```console +$ ./install.sh i3 # installed i3 dotfiles +``` There are two potential gotchas: -1. `stow` is not installed on the system. Be sure to install it. +1. `stow` is not installed on the system. There is a bash equivalent that is + close enough for most purposes in this repo that the install script will + use. 2. There submodules in this repo (mostly neovim plugins) and they didn't get - populated when you cloned the repo. + populated when you cloned the repo. See above. -This repo should have been cloned using the --recurse-submodules flag, i.e. -```console -$ git clone --recurse-submodules https://git.sr.ht/~jswank/dotfiles -``` - -But, since you forgot, fix this by running: -```console -$ git submodule update --init --recursive -``` diff --git a/install.sh b/install.sh index 2c1afef..9d515e0 100755 --- a/install.sh +++ b/install.sh @@ -17,6 +17,10 @@ for f in ~/.zshrc ~/.profile; do fi done +if [ -n $1 ]; then + $STOW -t $HOME $1 + exit 1 +fi # rm -f $HOME/.zshrc $HOME/.profile >/dev/null 2>&1