4
# FILE NAME useful.inc.sh
7
# Gustav Hartvigsson 2024
8
# Distributed under the Cool Licence 1.1
11
# This file provides usefule bash libary functions.
13
# Add the following to your script to be able to include it:
14
# __SCRIPT_ROOT=$(dirname $(readlink -f $0))
15
# source $__SCRIPT_ROOT/useful.inc.sh
22
# Silent a run command.
25
# A command and it's arguments.
28
# Exit code of command.
31
function __silent () {
39
# FUNCTION __find_tool
42
# checks if a tool (progam) exists.
45
# You need to specify "__SANITY=true" among your globals.
47
function __find_tool () {
51
echo " Can't find tool \"${1}\"."