#!/bin/bash function main-inx () { #FUNCTION="$CALL" # Grab all the functions indiscriminately so we know what's what, and can match the call ;-) . f-sirius . f-menu . f-plinput . f-radiomenu . f-hints . f-intro . f-tour . f-tutorial . f-fun . f-usb . f-access . f-why . f-send . f-splash . f-eject . f-prompt . f-plait-return . f-escape . f-mail-settings . f-mail . f-colours . f-monitor . f-mailscreen . f-filemanage . f-mutt . f-net . f-flip . f-switch . f-sup . f-office . f-scroffice . f-sshfs . f-music . f-ttynum # Check how we are being called ( which function needed first? ) function call () { # Debug #echo $CALL >> ~/main-debug case "$CALL" in inx) f-splash f-menu ;; menu) f-menu ;; random) f-plinput ;; stream) f-radiomenu ;; hints) f-hints ;; intro) f-intro ;; tour) f-tour ;; tutorial) f-tutorial ;; fun) f-fun ;; usb) f-usb ;; why) f-why ;; mailinx) f-mail ;; monitor) f-monitor ;; mailscreen) f-mailscreen ;; filemanage) f-filemanage ;; mutt) f-mutt ;; netinx) f-net ;; splash) f-splash ;; office) f-office ;; sharinx) f-sshfs ;; music) f-music ;; sirius) f-sirius ;; *) echo "main-inx: Bad call ... can't find "$FUNCTION" ... this shouldn't happen ..." exit 1 ;; esac } #play with the colours before the call # f-flip calls f-switch calls "call" in main-inx f-flip }