This is a collection of bash, jshint, and vim configuration files that I use in my development environment. Dotfiles are a convenient way to setup your development environment enabling easy backup and restore of application configurations.
Includes an install script to setup fresh environment. Currenly supports osx but other unixy operating systems could quite easily be added.
The install script is written to be idempodent, which means that you should be able to run it easily again if something goes wrong during the install, and it should normally just skip the parts that are already complete.
If you want to know how dotfiles function, search online there are lots of tutorials that have been written.
Use at your own risk - these scripts run commands that could break your operating system.
I publish this repo publically mainly so that other developers that are setting up their dotfiles have some examples to base their setup on.
Having said that, I use it myself to build my own system, so it should be functional, that's the intention, but you should definitely know what you are doing if you do run this and I would advise reading and understanding the code before running it.
-
Add items you don't want tracked in .gitignore
-
Add .symlink in filename to files to be symlinked e.g. bash.symlink
bash -c "$(curl -fsSL https://raw.githubusercontent.com/mjgs/dotfiles/master/install.sh)"
You'll need to set a few environment variables in your shell before you run the script:
HOME - user home directory
OS_TYPE - osx (*)
DOTFILES_ROOT_DIR - path to directory where dotfiles repos and cloned
DOTFILES_REPO_URL - dotfiles repo url (e.g. git@github.com:mjgs/dotfiles.git)
DOTFILES_REPO_BRANCH - branch name (default: master)
DOTFILES_LOCAL_REPO_URL - dotfiles_local repo url (e.g. git@github.com:mjgs/dotfiles_local.git)
DOTFILES_LOCAL_REPO_BRANCH - branch name (default: master)
DOTFILES_RELATIVE_BASE - path segment used as base for relative symlink creation
(*) could add support for other unixy OS_TYPES by adding scripts to bin/install
I am currently making modifications that will make it easier to test on an existing operating system by setting the HOME variable to a temporary location.
Set environment variable DEBUG=1 to see debug logging as the scripts runs.
- Make it easier to test on an existing system - progres so far
- Nick Nisi dotfiles repository
- Mathias Bynens dotfiles repository
- @ptb and his OS X Lion Setup repository
- Kevin Suttle and his OSXDefaults project, which aims to provide better documentation for
~/.osx