| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| declare -xr CLI_PROGRAM='centos-art' |
| declare -xr CLI_PROGRAM_ID=$$ |
| declare -xr CLI_VERSION='1.0 (beta)' |
| |
| |
| declare -xr CLI_WRKCOPY="${HOME}/artwork" |
| declare -xr CLI_BASEDIR="${CLI_WRKCOPY}/trunk/Scripts/Bash" |
| declare -xr CLI_TEMPDIR='/tmp' |
| |
| |
| . gettext.sh |
| declare -xr TEXTDOMAIN=${CLI_PROGRAM}.sh |
| declare -xr TEXTDOMAINDIR=${CLI_WRKCOPY}/branches/L10n/Scripts/Bash |
| |
| |
| |
| |
| |
| |
| |
| if [[ ! -d ${CLI_WRKCOPY} ]];then |
| echo "`eval_gettext "The working copy must be under \\\"\\\$CLI_WRKCOPY\\\"."`" > /dev/stderr |
| exit |
| fi |
| |
| # Initialize common functions. |
| 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 `eval_gettext "The \\\"\\\$FILE\\\" needs to have execution rights."` > /dev/stderr |
| exit |
| fi |
| done |
| |
| |
| |
| unset FILE |
| unset FILES |
| unset FUNCTION |
| |
| |
| |
| |
| |
| |
| |
| |
| trap cli_terminateScriptExecution 0 |
| |
| |
| cli "$@" |