lib/pvl/util.sh
author Tero Marttila <tero.marttila@aalto.fi>
Fri, 27 Feb 2015 18:07:32 +0200
branch0.8
changeset 654 8069b08e90ac
parent 627 a81206440be2
permissions -rw-r--r--
bin/update: fixup relative/absolute paths
## Output calling function's name.
function func_caller {
    caller 1 | cut -d ' ' -f 2
}

## Test if given symbol is a function
# XXX: tests if it is anything atm?
function func_test {
    type -t "$1" > /dev/null
}

## Get current unix (utc) timestamp
function unix_time {
    date +'%s'
}