36 lines (34 with data), 643 Bytes
#!/bin/bash
## functions - fichero de funciones para DNFD
## por niky45
case $1 in
start)
GREP() { $@ |grep -v "#" ; }
PRINT() { bash $interfaz $@ ; }
FN() { source functions $1 ; }
CALL() { bash $@ ; }
#### variables
questions="questions"
selector="selector"
if [ "$NCURSES" == Y ] ; then ## interfaz unica... (en un solo fichero)
interfaz="interfaz-dialog"
else
interfaz="interfaz-txt"
fi
;;
dy) # debug=y
DBG() {
PRINT dbg $@; read C
if [ "$C" == y ] ; then $@ ;fi
}
;;
dn)
DBG() { echo ">>> $@" ; $@ ; }
;;
vy)
REDIR() { $@ ;}
;;
vn)
REDIR() { $@ > /dev/null 2>&1;}
;;
esac