Home

Awesome

Shellcheck CI bash_unit CI version version

Part of part of Bashful Scripting network network / Install with basher install

bashew.sh

Bashew Logo

bash script / project creator

ā³ TL;DR

to create a new stand-alone SCRIPT (just a xyz.sh script), with option parsing, color output (cf 1.)

    bashew.sh script

to create a new standalone script PROJECT (in a folder, with README) (cf 2.)

    bashew.sh project

to initialize a bashew-based REPO with CI/CD you just cloned (cf 3.)

    bashew init
 

šŸŽÆ Features

Self-contained

Option parsing

function library

batteries included

šŸ”„ Usage

Program: bashew 1.18.2 by peter@forret.com
Updated: May  1 16:49:18 2022
Description: package_description
Usage: bashew [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] [-n <name>] <action>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] output more [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] folder for debug files   [default: /Users/pforret/log/bashew]
    -t|--tmp_dir <?> : [option] folder for temp files  [default: /tmp/bashew]
    -n|--name <?>    : [option] name of new script or project
    <action>         : [parameter] action to perform: script/project/init/update

1. create new bash script (without repo)

bashew.sh script                    # will interactively ask for author & script details
bashew.sh -f script                 # will create new script with random name
bashew.sh -f -n "../list.sh" script # will create new script ../list.sh

Example:

$ bashew script
ā³  1. first we need the information of the author
Author full name         (pforret) > Peter Forret
Author email             (peter@forret.com) > 
Author (github) username (pforret) > 
ā³  2. now we need the path and name of this new script/repo
Script name (./bespoke_bunny.sh) > 
ā³  3. give some description of what the script should do
Script description (This is my script bespoke_bunny) > process log files
ā³  Creating script ./bespoke_bunny.sh ...
./bespoke_bunny.sh

$ bashew -f script 
ā³  Creating script ./mediums_appease.sh ...
./mediums_appease.sh

2. create new bash project folder/repo (with README.md, CI/CD)

$ bashew project               # will interactively ask for author & script details
or
$ bashew -f project            # will create new project with random name
or
$ bashew -f -n "tango" project # will create new project in folder "tango"

Example:

$ bashew -f project
ā³  Creating project ./bounden_brawled ...
CHANGELOG.md README.md VERSION.md LICENSE .gitignore .env.example bounden_brawled.sh bitbucket-pipelines .github  
āœ…  next step: 'cd ./bounden_brawled' and start scripting!

3. create a bash script repo, with CI/CD, with README, with tests, with versioning ...

$ git clone https://github.com/<you>/<your repo>.git
$ cd <your repo>
$ ./bashew.sh init             # will ask for details and initialise/clean up the repo

and then, if you have setver.sh:

$ setver push          # will commit and push new code
$ setver new patch     # will set new version to 0.0.1
$ setver set 1.0.0     # when your first working version is committed

4. git clone into new repo

$ git clone --depth=1 https://github.com/pforret/bashew.git <newname>
$ cd <newname>
$ ./bashew.sh init             # will ask for details and iniialise/clean up the repo

šŸš€ Installation

$ git clone https://github.com/pforret/bashew.git
$ ln -s bashew/bashew.sh /usr/local/bin
$ basher install pforret/bashew

šŸ¦Ŗ Built with Bashew

šŸ™ Acknowledgements

šŸ¤” What's that name? Bashew?

Stargazers over time

Stargazers over time