1
0
Fork 0
mirror of synced 2024-09-16 09:52:53 -04:00

Add Mercurial install script

This commit is contained in:
Anish Athalye 2015-05-22 13:33:10 -04:00
parent fd7f3b8551
commit 9c1af76e9e
2 changed files with 35 additions and 8 deletions

View file

@ -29,6 +29,8 @@ you're looking for [some inpiration][inspiration], we've got you covered.
The following will help you get set up using Dotbot in just a few steps. The following will help you get set up using Dotbot in just a few steps.
If you're using Git, you can add Dotbot as a submodule:
```bash ```bash
# replace with the path to your dotfiles # replace with the path to your dotfiles
cd ~/.dotfiles cd ~/.dotfiles
@ -37,8 +39,19 @@ The following will help you get set up using Dotbot in just a few steps.
touch install.conf.yaml touch install.conf.yaml
``` ```
To get started, you just need to fill in the `install.conf.yaml` and Dotbot will If you're using Mercurial, you can add Dotbot as a subrepo:
take care of the rest. To help you get started we have [an
```bash
# replace with the path to your dotfiles
echo "dotbot = [git]https://github.com/anishathalye/dotbot" > .hgsub
hg add .hgsub
git clone https://github.com/anishathalye/dotbot
cp dotbot/tools/hg-subrepo/install .
touch install.conf.yaml
```
To get started, you just need to fill in the `install.conf.yaml` and Dotbot
will take care of the rest. To help you get started we have [an
example](#full-example) config file as well as [configuration example](#full-example) config file as well as [configuration
documentation](#configuration) for the accepted parameters. documentation](#configuration) for the accepted parameters.

14
tools/hg-subrepo/install Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
(cd "${DOTBOT_DIR}" && git submodule update --init --recursive)
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"