4
# FILE NAME useful.inc.sh
7
# This file provides usefule bash libary functions.
9
# Add the following to your script to be able to include it:
10
# __SCRIPT_ROOT=$(dirname $(readlink -f $0))
11
# source $__SCRIPT_ROOT/useful.inc.sh
18
# Silent a run command.
21
# A command and it's arguments.
24
# Exit code of command.
27
function __silent () {
33
# FUNCTION __find_tool
36
# checks if a tool (progam) exists.
39
# You need to specify "__SANITY=true" among your globals.
41
function __find_tool () {
45
echo " Can't find tool \"${1}\"."