Mt Xia: Technical Consulting Group
Business Continuity / Disaster Recovery / High Availability Data Center Automation / Audit Response / Audit Compliance
drawMenu() { CNT_DRAW=0 CNT_LINE=0 while LAB_RAW="$( getstr )" do CNT_DRAW="$(( ${CNT_DRAW} + 1 ))" LAB_FILL="${LAB_RAW%%\|*}" M_DFLT="${LAB_RAW#*\|}" M_DFLT="${M_DFLT%\|*}" eval M_${LABEL}_${CNT_DRAW}="\"${M_DFLT}\"" CNT_LINE="$(( ${CNT_DRAW} * 2 ))" COL_DRAW="26" (( ${CNT_DRAW} >= 10 )) && COL_DRAW="25" mvaddstr "$(( 3 + ${CNT_LINE} ))" ${COL_DRAW} "${CNT_DRAW} = ${LAB_FILL}" done < ${DD_TOPDIR}/menu${1}.txt LAB_PROMPT=$( fillcol "Select Menu Option" "0" 32 ) mvaddstr "$(( ${CNT_LINE} + 6 ))" 5 "${LAB_PROMPT}:" clrtoeol refresh return ${CNT_DRAW} }