Skip to content
/ dry-wit Public
forked from rydnr/dry-wit

Bash framework to improve maintainability and readability of shell scripts.

License

Notifications You must be signed in to change notification settings

osoco/dry-wit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is dry-wit, a framework for bash scripts.

This project is useful when writing new scripts. It provides a common
layout and a toolbox of functions to help writing shell scripts from
scratch.

Since Bash is an interpreted language, you can review the contents of
dry-wit yourself.

Basically, in order to write dry-wit scripts you'll do the following:

- Clone this repository under ~/.dry-wit:
  git clone https://github.com/osoco/dry-wit.git $HOME/.dry-wit

- Add ~/.dry-wit/src to your PATH:
echo 'export PATH=$PATH:$HOME/.dry-wit/src' >> $HOME/.bashrc

- Use this shebang in your scripts.
#!/usr/bin/env dry-wit

- Write the only mandatory function:
main()

The main() function is the starting point of your script. You don't need to care about anything but the funcional requirements of your script.

Note for Mac OS X users:

- MacOS X comes with an old version of Bash. dry-wit requires Bash 4+. To use a recent version, install homebrew, then bash, and run
chsh -s /usr/local/bin/bash
- Additionally, dry-wit requires the following brew formulae:
  - readline
  - coreutils
  - pidof
  - wget

brew install readline
brew install coreutils
brew install pidof
brew install wget

About

Bash framework to improve maintainability and readability of shell scripts.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 97.0%
  • HTML 1.7%
  • Other 1.3%