GithubHelp home page GithubHelp logo

bashing's Introduction

bashing

bashing is a small tool that let's you create single-file Bash tools in a multi-file way.

Current stable Version: 0.2.2

Setup

Dependencies

bashing needs the GNU variant of sed to function properly. If you're on MacOS you can use e.g. Homebrew to install the package gnu-sed.

Installation

mkdir -p ~/.bin
curl -ko ~/.bin/bashing https://raw.github.com/xsc/bashing/stable/bin/bashing
chmod +x ~/.bin/bashing

Make sure ~/.bin is on your $PATH, e.g. by adding export PATH="$PATH:~/.bin" to your .bashrc.

Usage

Have a look at the wiki and the Quickstart Tutorial. And if you want to examine a full-fledged Bashing project, why not Bashing itself?

$ bashing new greet
Initializing ./greet ...
Successfully initialized './greet'.
$ cd greet

$ bashing new.task hi
Created Task 'hi'
$ bashing run hi
Hello from Task 'hi'
$ bashing uberbash
Creating /git/public/shell/greet/target/greet-0.1.0-SNAPSHOT.sh ...
Uberbash created successfully.

$ ./target/greet-0.1.0-SNAPSHOT.sh
Usage: ./target/greet-0.1.0-SNAPSHOT.sh <command> [<parameters> ...]

    hello    :  (no help available)
    help     :  display this help message
    hi       :  (no help available)
    version  :  display version

$ ./target/greet-0.1.0-SNAPSHOT.sh hi
Hello from Task 'hi'

$ ./target/greet-0.1.0-SNAPSHOT.sh version
greet 0.1.0-SNAPSHOT (bash 4.2.25(1)-release)

$ bashing install
Creating /git/public/shell/greet/target/greet-0.1.0-SNAPSHOT.sh ...
Uberbash created successfully.
Deploying to /home/yannick/.bin/greet ...
Deployed successfully.

$ greet version
greet 0.1.0-SNAPSHOT (bash 4.2.25(1)-release)

Bashing Bashing

To build bashing, check out this repository and run:

$ ./bin/bashing uberbash
Creating /git/public/bashing/target/bashing-0.1.0-SNAPSHOT.sh ...
Uberbash created successfully.

This will create a standalone bashing script using bashing itself!

License

Copyright © 2013-2015 Yannick Scherer

Bashing is distributed under the MIT License.

bashing's People

Contributors

kui avatar xsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bashing's Issues

Error while compiling 0.2.1

Hi, I'm using:
bashing 0.2.1 (bash 4.3.11(1)-release)
And I'm encountering the following issue when following the standard tutorial found here.
When I follow the tutorial, hence make the file %docroot%/src/lib/print.sh and %docroot%/src/tasks/hello.sh I'm receiving the following error:

$ bashing run hello
bash: line 19: syntax error: unexpected end of file

I checked to see if I made any mistakes. Here are my files:
%docroot%/src/lib/print.sh

#!/bin/bash
function printGreeting() {
    local g="$1"
    local r="$2"
    echo "${g}, ${r}!"
}

and %docroot%/src/tasks/hello.sh

#!/bin/bash
printGreeting "Hello" "$1"

So this seems correct to me.
When running bashing uberbash it creates the following code:

[...]
export __GROUP_ID='file'
function printGreeting() {
    local g="$1"
    local r="$2"
    echo "${g}, ${r}!"
function cli_hello() {
[...]

It seems like it forgets a bracket at the end of the function created. I added this bracket manually and the program runs. Did I do anything wrong? Or is there a mistake in the program?

Not a problem, per se

Hi there. This looks like a great tool. However, I'm not entirely certain what problem this tool solves.
What problem does this tool solve?
It clearly looks like it could be useful for managing something. Just not sure what.

What issue(s) did having this tool, solve for you?

To me it seems like a lot of overhead to get a semblance of version management. But I'm really curious to understand more about what processes/workflows are made easier by using this tool.

I've read the wiki, and understand what it says there. I'm just not finding the answer to my above question(s) anywhere there. Again, looks like a cool tool. Great work. I'm just not understanding how or when it is best used.

Thanks for any further details.

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.