Script to deploy and maintain home easily
.rehome.json
wget https://raw.githubusercontent.com/hiqdev/rehome/master/rehome ; python rehome init me/dotfiles
The main config file is .rehome.json
Here is example config:
{
"dotfiles": "hiqsol/dotfiles",
"shadows": {
"prj/sol/shadow-home": "ssh://git.solex.me:222/git/sol/shadow-home"
},
"shell": "zsh",
"repos": {
".vim/bundle/Vundle.vim": "VundleVim/Vundle.vim",
"prj/hiqsol/quotes": "hiqsol/quotes",
"prj/hiqdev/rehome": "hiqdev/rehome"
},
"installs": {
"bin/zsh": "which zsh || echo apt-get install zsh",
"bin/vim": "which vim || echo apt-get install vim",
"bin/tmux": "which tmux || echo apt-get install tmux",
"bin/composer": [
"wget https://getcomposer.org/installer -O composer-setup.php",
"php composer-setup.php --install-dir=bin --filename=composer",
"rm composer-setup.php",
"bin/composer global install"
]
},
"updates": {
"bin/composer": [
"bin/composer self-update",
"bin/composer global update"
],
"prj/hiqdev/hidev/vendor": [
"cd prj/hiqdev/hidev ; composer update"
]
}
}
Looks quite clear:
dotfiles
- generally accessable dotfiles repositoryshadows
- protected (shadow) repositories with files to be simlinked into homeshell
- shell to be set with chsh
repos
- array of path => repo to be installed/updated to given pathsinstalls
- array of path => commands to be run if path doesn't existupdates
- array of path => commands to be run on updateIf you want run commands unconditionally just put them into installs
or update
section with unexistent path.
See zsh, vim and tmux in example which check these commands availability.
This project is released under the terms of the BSD-3-Clause license. Read more here.
Copyright © 2016-2017, HiQDev (http://hiqdev.com/)