Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.28 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.28 KB

shunc

Build Status

The goal of this library is to make shell scripting easier for everyone. Your shell of preference should not matter!

This script will not change the state of your variables. Meaning that if a function needs to declare a variable it will save the previous value and reset the variable's value after execution.

Installation

  1. Generate the script:
./bin/generate
  1. The script will be in dist, move it into your own project.
  2. Add this to the beginning of your script:
. <Path_To_New_Location>/shunc

Examples

#!/bin/sh

. $HOME/dev/password_check/lib/shunc

[ "$(_length $1)" -gt 8 ] && echo PASS || echo FAIL

Documentation

You can find documentation for the various functions on the wiki.

Linting

docker run -e SHELLCHECK_OPTS="-e SC1091" -v "$PWD:/mnt" koalaman/shellcheck <Path_To_File>

Testing

Prerequisite(s)
All tests
./bin/run_tests
Single test
sh <Path_To_Test>

Submodules

Retrieve all submodules
git submodule update --remote --recursive --init