diff options
author | P. J. McDermott <pj@pehjota.net> | 2015-10-28 13:14:52 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2015-10-28 13:14:52 (EDT) |
commit | 875272cdb6f7f2b9d51f78c6a6dc2bfe4d56301a (patch) | |
tree | dc5442e688864a566f77c9c968b8c7b962cf6f36 | |
parent | 141d91012e788528346b8dff9fa8a92436477f6c (diff) | |
download | firman.sh-875272cdb6f7f2b9d51f78c6a6dc2bfe4d56301a.zip firman.sh-875272cdb6f7f2b9d51f78c6a6dc2bfe4d56301a.tar.gz firman.sh-875272cdb6f7f2b9d51f78c6a6dc2bfe4d56301a.tar.bz2 |
dbg(), info(), warn() err(): Call log_*() functions
-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 } |