23 lines
364 B
Bash
23 lines
364 B
Bash
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
|
|
}
|