Hop is a simple bash script which quickly bootstraps project's
dependencies described in the .hop
file. Hop uses make
, and
makefile formatted files.
You can install Hop by executing the following code snippet in your terminal. If you don't have cURL installed, then you must figure out on your own how to install it :P.
$ curl -sL https://raw.github.com/nu7hatch/hop/master/install | TARGET=/usr/bin/hop bash
You may want to change the target path to get Hop installed somewhere else.
To use Hop you need to describe all the dependencies to be bootstrapped
in the .hop
file, in root directory of your project. The .hop
files
use makefile syntax to describe dependencies. Here's an example:
all: redis mongodb
mongo:
sudo mongod -f /etc/mongod.conf
redis:
sudo systemctl start redis.service
When you have your .hop
file ready, you just call hop
command in the
project directory:
$ cd ~/my/project/
$ hop
-----> Hopping in...
sudo mongod -f /etc/mongod.conf
forked process: 6246
all output going to: /var/log/mongo/mongod.log
sudo systemctl start redis.service
-----> Fuck yeah!
Hop will run everything you need to start working with the project at once.
Your Hop configuration doesn't necessary need to be in the project directory.
You can use common hop-files placed in ~/.hop/
directory. To use common
hop-file you must specify its name hen calling hop
command:
$ hop common_setup
This will hop in using the ~/.hop/common_setup
configuration file.
Copyright 2012 (C) by Chris Kowalik (aka. nu7hatch)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.