do not use declare in functions
bash on RHEL/SL 6 systems does not support the option -g
. The scope of a variable defined with declare
is local. So something like:
declare TEMP_DIR=''
pbuild.temp_dir() {
declare -r TEMP_DIR="$1"
}
does not work.