diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-06-05 13:10:10 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-06-05 13:10:10 +0200 |
commit | cb2b52a46695de056b6c259fbbc74661e25d20f2 (patch) | |
tree | ae858fc3f79a2b80b5ee4e867321b6d265a67824 /nix-utils.sh | |
parent | b12c8e040857b5732283369ad5674ed9eb0f2c75 (diff) |
Add utility script for more DRY code
Diffstat (limited to 'nix-utils.sh')
-rw-r--r-- | nix-utils.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nix-utils.sh b/nix-utils.sh new file mode 100644 index 0000000..6df996e --- /dev/null +++ b/nix-utils.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +Color_Off='\e[0m' +Red='\e[0;31m' +Green='\e[0;32m' + +stderr() { + echo -e "${Red}[$(basename $0)]: ${*}${Color_Off}" >&2 +} + +stdout() { + [ $VERBOSE -eq 1 ] && echo -e "${Green}[$(basename $0)]:${Color_Off} $*" +} + |