Git Product home page Git Product logo

rl's Introduction

Adds two executable shell scripts, rl and rlmk

Installation

Install with

make install

Usage

rl searches the current and all parent directories for an rl.sh file. If it finds one, it will source it then run the arguments to rl as a command. This lets you easily use for example libraries and executables within the project without installing anything. Add an rl.sh file at the root directory of the project. To run commands within this local context, do

rl <COMMAND>

from anywhere within the project. While processing rl.sh, the RL_ROOT variable will be defined as the directory that rl.sh lives in.

rl Example

mkdir -p bin child_dir
echo '#!/usr/bin/env sh\necho Hello World!' > bin/example
chmod u+x bin/example
echo 'export PATH=$RL_ROOT/bin:$PATH' > rl.sh
cd child_dir
rl example

The script bin/example is found and executed on the last line, even from some other directory, because rl.sh adds it to the PATH.

rlmk

rlmk is a shortcut to run make in the same directory as the rl.sh found by rl. Extra arguments are passed through to the make invocation. This may be useful to quickly run PHONY targets from anywhere in the project tree.

rlmk doesn't automatically include the enviroment set up by rl. This is a deliberate design choice to discourage unintentially writing Makefiles that only work when run with rl. To run the Makefile with the rl enviroment, either run rl as needed within the Makefile or prefix the rlmk invocation with rl as you would with other commands:

rl rlmk <MAKE TARGET>

rl's People

Contributors

aarongaut avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.