This is my collection of configurations and scripts.
To clone the repository with all submodules into ~/.dotfiles, run
git clone --recursive https://github.com/yangle/dotfiles.git ~/.dotfilesTo update all submodules, run
git submodule sync && git submodule update --init --recursiveThe setup script uses pattern matching to create symlinks in the
$HOME directory:
-
For any file prefixed by an underscore in the repository root, say
_$FILE,setupcreates a symlink~/.$FILEto_$FILE. -
For any directory prefixed by an underscore in the repository root, say
_$DIR/,setupcreates a symlink~/.$DIRto_$DIR/. -
For any directory prefixed by a dash in the repository root, say
-$DIR/,setupmakes a directory~/.$DIRand creates in it a symlink to each individual file under_$DIR/, making nested subdirectories when necessary.
(This leaves all other files under~/.$DIRout of version control.) -
Any file or directory in the repository root that is not prefixed by an underscore or a dash is ignored by
setup.
Before creating the symlinks and thus possibly overwriting existing files in
the $HOME directory, setup creates a tarball backup of such files to be
overwritten.