GithubHelp home page GithubHelp logo

leadone / blip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neechbear/blip

0.0 1.0 0.0 91 KB

Bash Library for Indolent Programmers

Home Page: https://nicolaw.uk/blip

License: Other

Shell 94.13% Makefile 5.87%

blip's Introduction

Build Status Code Climate Issue Count Pre-release Alpha

blip - Bash Library for Indolent Programmers

Programmers are lazy. Good system administrators are really lazy. (Why bother doing something more than once)?

Unfortunately, due to the fact that Bash doesn't particularly lend itself to reusable code, it doesn't enjoy the same wealth of shared code available that you find with Python or Perl.

"But what about the lazy sysadmin that needs to write a script, where Bash genuinely is the most appropriate option?", I hear you ask! Well, by providing functions for many common tasks, I'm hoping that blip will help fill some of the gaps for those situations.

source /usr/lib/blip.bash
# Alternate path for macOS Homebrew installations:
#source /usr/local/lib/blip.bash

Please see the man page man blip.bash, blip.bash.3.md for full documentation or /usr/share/doc/blip directory for code examples and other useful information.

Installation

Ubuntu

On Ubuntu, you can install from my PPA ppa:nicolaw/blip by running the following commands:

sudo add-apt-repository ppa:nicolaw/blip
sudo apt-get update
sudo apt-get install blip

Debian

On Debian or other Debian-based distributions, you can download the DEB package from GitHub and install it manually with:

# Determine release latest DEB package URL.
blip_deb_url="$(curl -sSL \
  "https://api.github.com/repos/neechbear/blip/releases/latest" \
    | jq -r '.assets[] | select(.name|match(".deb$";"i")).browser_download_url')"
# Download and install latest release DEB package.
curl -sSLO "$blip_deb_url"
sudo dpkg -i "${blip_deb_url##*/}"

RedHat, CentOS, Fedora

Similarly for RedHat based distributions you can install the RPM package from GitHub manually with:

# Determine release latest RPM package URL.
blip_rpm_url="$(curl -sSL \
  "https://api.github.com/repos/neechbear/blip/releases/latest" \
    | jq -r '.assets[] | select(.name|match(".rpm$";"i")).browser_download_url')"
# Download and install latest release RPM package.
curl -sSLO "$blip_rpm_url"
sudo yum localinstall "${blip_rpm_url##*/}"

macOS Homebrew

A Homebrew formula for Blip is maintained in the neechbear/tap tap.

brew tap neechbear/tap
brew install neechbear/tap/blip
brew list blip

Blip will typically be installed into the /usr/local/Cellar/blip/ cellar, and symlinked from /usr/local/lib/blip.bash.

Source

Souce installation can be achieved either by cloning the GitHub repository, or (preferably) by downloading the latest release tarball from GitHub:

# Determine release latest tarball URL.
blip_tar_url="$(curl -sSL \
  "https://api.github.com/repos/neechbear/blip/releases/latest" \
    | jq -r '.assets[] | select(.name|match("blip-[0-9]+.[0-9]+.tar.gz$";"i")).browser_download_url')"
# Download latest release tarball.
curl -sSLO "$blip_tar_url"
# Extract and install Blip from tarball.
tar -zxf "${blip_tar_url##*/}"
cd blip-*/
sudo make install

Links

TODO

  • Merge all the other cool and reusable stuff I've written in to this library (see pending functionality below).
  • Make all the shell scripting comply with a sensible style guide (like Google's one at https://google.github.io/styleguide/shell.xml).
  • Finish writing comprehensive manual page with code examples for each function.
  • Finish writing comprehensive unit tests with full code coverage.
  • Setup automatic build of release tarballs, Deb and RPM packages upon GitHub repository commits (assuming a Travis CI pass of unit tests).
  • Maybe create pkg, apk and portage packages if I get bored.
  • Add get_user_input() - multi character user input without defaults.
  • Add process locking functions.
  • Add background daemonisation functions (ewww; ppl should use systemd).
  • Add standard logging functions.
  • Add syslogging functionality of all process STDOUT + STDERR.
  • Add common array manipulation functions.

blip's People

Contributors

neechbear avatar

Watchers

 avatar

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.