mklive/scripts/functions.sh

23 lines
364 B
Bash
Raw Normal View History

2018-05-21 12:41:52 +00:00
function requiredir {
[ -n "$1" ] || exit 1
[ -e $1 ] || mkdir $1
}
function err {
echo $1
exit 1
}
function checkstage {
[ -e ${WORKDIR}/stage/_$1 ] || return 1
[ "$(cat $WORKDIR/stage/_$1)" != "done" ] && return 2
return 0
}
function startstage {
echo -n "started" > ${WORKDIR}/stage/_$1
}
function endstage {
echo -n "done" > ${WORKDIR}/stage/_$1
}