undertaker: fix tomb binary detection

This commit is contained in:
boyska 2012-08-12 00:57:13 +02:00 committed by Jaromil
parent df2348381e
commit 199ce8008c

View File

@ -30,10 +30,12 @@ TRAPKILL() die "KILL signal caught, undertaker aborting."
TRAPSTOP() die "STOP signal caught, undertaker aborting."
# first of all source the tomb core functions
which tomb > /dev/null
if [[ $? != 0 ]]; then
TOMBBIN=$(dirname $(readlink -f $0))/tomb
if ! [[ -x $TOMBBIN ]]; then
print "$fg[red][!]$fg[white] Tomb command not found, operation aborted." >&2; exit 1
fi
source $TOMBBIN ${tomb_opts[@]} source
TOMBEXEC=undertaker
key_found() {
# $1 is "url"