| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| [[ ! $HOME =~ '^/home/[[:alnum:]]+' ]] && HOME='/home/centos' |
| |
| |
| export CLI_PROGRAM='centos-art' |
| export CLI_PROGRAM_ID=$$ |
| export CLI_VERSION='1.0 (beta)' |
| export CLI_BASEDIR="${HOME}/artwork/trunk/Scripts" |
| export CLI_TEMPDIR='/tmp' |
| |
| |
| . gettext.sh |
| export TEXTDOMAIN=${CLI_PROGRAM}.sh |
| export TEXTDOMAINDIR=${HOME}/artwork/trunk/L10n/Scripts |
| |
| |
| FILES=$(ls ${CLI_BASEDIR}/Functions/{cli,cli_*}.sh) |
| for FILE in ${FILES};do |
| if [[ -x ${FILE} ]];then |
| . ${FILE} |
| FUNCTION=$(grep '^function ' ${FILE} | cut -d' ' -f2) |
| export -f ${FUNCTION} |
| else |
| echo `gettext "The ${FILE} needs to have execution rights."` > /dev/stderr |
| exit |
| fi |
| done |
| |
| |
| |
| unset FILE |
| unset FILES |
| unset FUNCTION |
| |
| |
| |
| |
| |
| |
| |
| |
| trap cli_terminateScriptExecution 0 |
| |
| |
| cli "$@" |