All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
utilities.sh File Reference

Go to the source code of this file.

Functions

function isFlagSet ()
 
function isFlagUnset ()
 
function STDERR ()
 
function ERROR ()
 
function FATAL ()
 
function LASTFATAL ()
 
function isRelativePath ()
 
function simplifyPath ()
 

Function Documentation

function ERROR ( )

Definition at line 18 of file utilities.sh.

18 { STDERR "ERROR: $*" ; }
function STDERR()
Definition: utilities.sh:17
function FATAL ( )

Definition at line 19 of file utilities.sh.

19  {
20  local -i Code="$1"
21  shift
22  STDERR "FATAL (${Code}): $*"
23  exit "$Code"
24 } # FATAL()
then echo FATAL
function STDERR()
Definition: utilities.sh:17
shift
Definition: fcl_checks.sh:26
then local
function isFlagSet ( )

Definition at line 7 of file utilities.sh.

7  {
8  local -r VarName="$1"
9  [[ -n "${!VarName//0}" ]]
10 } # isFlagSet()
function isFlagSet()
Definition: utilities.sh:7
then local
esac echo uname r
function isFlagUnset ( )

Definition at line 12 of file utilities.sh.

12  {
13  local -r VarName="$1"
14  [[ -z "${!VarName//0}" ]]
15 } # isFlagUnset()
process_name opflash particleana ie ie ie z
then local
esac echo uname r
function isFlagUnset()
Definition: utilities.sh:12
function isRelativePath ( )

Definition at line 32 of file utilities.sh.

32  {
33  local -r Path="$1"
34  [[ "${Path:0:1}" != '/' ]]
35 } # isRelativePath()
function isRelativePath()
Definition: utilities.sh:32
then local
esac echo uname r
function LASTFATAL ( )

Definition at line 25 of file utilities.sh.

25  {
26  local -i Code="$?"
27  [[ "$Code" == 0 ]] || FATAL "$Code" "$@"
28 } # LASTFATAL()
then echo FATAL
function LASTFATAL()
Definition: utilities.sh:25
then local
function simplifyPath ( )

Definition at line 38 of file utilities.sh.

function STDERR ( )

Definition at line 17 of file utilities.sh.

17 { echo "$*" >&2 ; }