Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
/ projector Public archive

Project specific bash configurations

License

Notifications You must be signed in to change notification settings

bas080/projector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Projector

DEPRECATED: See https://github.com/bas080/dotbashrc

Build Status

Project specific bash scripts.

Reasoning

Usually I find myself needing bash commands for specific projects, usually for compilation, working with git, etc. Projector allows you to define a project specific bash file.

Installation

It's also possible to download a specific version by replacing master with a valid version.

The intention is to source the shell specific version of projector.

Bash

wget -O ~/.projector.bash https://raw.githubusercontent.com/bas080/projector/master/dist/projector.bash
echo 'source ~/.projector.bash' >> ~/.bashrc

Zsh

wget -O ~/.projector.zsh https://raw.githubusercontent.com/bas080/projector/master/dist/projector.zsh
echo 'source ~/.projector.zsh' >> ~/.zshrc'

Instructions

./.local.bashrc

Define a file in your project root called .local.bashrc. An example:

#!/bin/bash

alias clean='cd $PROJECTOR_HOME && rm -rf _build'
alias compile='rebar3 compile'
alias recompile='clean && compile'

The $PROJECTOR_HOME variable contains the path of the last sourced .local.bashrc file. This allows one to run commands without being in the home directory of the project.

A new shell process is spawned whenever you change into the local directory. It will source the default rc files and the .local.<shell>rc.

$ cd my/project/dir
$ recompile
# ...

Contributors

Roadmap

  1. Make projector work for zsh.
  2. Start a cookbook so people can share handy tricks.
  3. Find people that are interested and would like to make this project better.

License

MIT, see LICENSE file.