diff options
-rw-r--r-- | src/ui.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -15,8 +15,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -ui_functions='exit_ui resume_ui dbg info warn err show_menu' - init_ui() { local ui="${1}" @@ -31,9 +29,12 @@ init_ui() ;; esac - for fn in ${ui_functions}; do + for fn in exit_ui resume_ui show_menu; do eval "${fn}() { ${ui}_${fn} \"\${@}\"; }" done + for fn in dbg info warn err; do + eval "${fn}() { ${ui}_${fn} \"\${@}\"; log_${fn} \"\${@}\"; }" + done ${ui}_init_ui } |